click click

Showing posts with label freebsd. Show all posts
Showing posts with label freebsd. Show all posts

Wednesday, May 26, 2010

command switches/ flags

* Switches control behavior of commands and services.
* Switches can require arquments
* Switches can be combined for cumulative impact
* e.g.:-
# ls -a
complete list, including hidden files

# ls -l
detailed list of file, including ownerships, permissions, size, etc.

# ls -al
combined complete + detailed list of files.

# ps -a
complete process list for all users

# ps -x
include processes with no controlling terminals

# ps -w
increase max column width to 132

# ps -axw
combined process list of above flags.

# kill -HUP pid
send a HUP signal to service/ process

# chown -R username directory
recursively change ownership

# chmod -R g+w directory
recursively allow group to write to directory

# grep -i 'local' /etc/hosts
case insensitive search

# tail -F /var/log/messages
show changes at end of file in real time

* Full manual for each command can be invoked by 'man' command, e.g.
man ls


Tuesday, May 25, 2010

SOME BASIC COMMANDS

# pwd
Displays current directory location.

# ls
List the file in the current directory.

# cat
Displays content of file. e.g. cat /etc/hosts

# more
pager, i.e. same as cat but pauses every end of screen. e.g. more /etc/hosts

# cd
change directory location. e.g. cd /etc


# ps
process list

# top
task and resource management

# kill
terminate or restart processes. e.g. kill pid

# chown
change ownership of resource. e.g. chown user filename

# chmod
change permissions of resource. e.g. chmod g+w filename

# grep
look for pattern in resouce content. e.g. grep hostname /etc/hosts

#tail
show end of resource. e.g. tail /var/log/messages

full manual for each command can be invoked by 'man' command. e.g. 'man ls'

tiap2 hari click je

Link2Communion.com

ip-address

Followers