Pages

Sunday, January 16, 2011

Handy Linux commands

Listing attached devices :

sudo fdisk –l

Listing All the bus info   :

sudo lshw -businfo

Add path to $PATH  in  ~username/.cshrc :

setenv PATH  ${PATH}:<path_to_be_added>

to know the disk usage :

df -h

Size of a directory including the subdirecotory

du -ch | grep total

Find number of files in a directory including sub-directories

find . -type f   | wc -l