Saturday, February 14, 2009

Class 6 more commands!

More commands:

Here I am discussing some useful commands that might be helpful to work with,And some explanations for them.*NB: use tab to get the complete list of possible commands
for eg: if we pres tab, after typing 'trace' , will list the possible commands like
tracepath,tracepath6, traceroute, traceroute6. Then type the next letter n tab to display the correct command!

ifconfig:ifconfig (short for interface configurator) serves to configure and control TCP/IP network interfaces from a command line interface (CLI).
here is the screen short for the ifconfig command result--->

lspci:lists PCI devices in the system, pci --v gives more detailed
description.
lsusb:lists the usb port details,lsusb --v
gives more detailed description.
tty:to find the terminal location
type command :shows the type of the command "command".
eg: type reboot shows the result /sbin/reboot,(sbin will be described in the file system,later)
ls -R :recursive listing
ls -r :reverse listing of files directories
ls -lt:longlisting with last modified file at first
ls -sSt: size in bytes,Sorted,longlisting
ls -F:to classify accouirding to directories n files
ls -lh:lists in human readable format

rm -r dir :removes the directory, but wont work if it is empty.
rm -rf dir : removes the directory dir recursively and forcefully.
mkdir -p dir1 dir2 dir3 :makes directories dir1,dir2 and dir3 in a single command
findfs LABEL=/ :to search the file system using label or UUID(universially unique identifier)
dumpe2fs /dev/sda1 | more :shows the UUID for the device dev/sda1, | more is used to show the output of the first command. ' | ' is called as grep which is used to input the output of the first command.
su username : to switch the user to username,su(substitute user)
su - username :goes to the home directory of the username
less /etc/services : will lists all available ports and to which it is assigned to.
ps :shows current running process
ps -aux : all user server process
top :lists live processes

tell2humanlinux@gmail.com

3 comments: