Tuesday, February 17, 2009

Class 7 continued

cat >filename :to i/p the items to a file, but replaces the old data.
cat >>filename :will append the files,wont delete old data.
cat file1 file2 >file3 :file3 contains o/p of file file1 & file2 which are concatenated.
sort : hit enter, n type the data, n press ctrl D . it will sort the data alphabetically.
sort :will sort the contents of 'file' alphabetically.
who | sort :here a pipe '|' is used to o/p the sorted list of users.
host www.website.com : to display the static ip of a 'website'.
grep: to seach inside a file
grep -i "word" file : will search for files with "word" within a directory recursively.
grep -r "word" /etc :will search for "word" inside /etc, recursively.
grep 'word' *.c : to search for files with particular extension *.c
man heir :to know file system hierarchy.

next i wil post the file system hierarchy,some more commands n files.

tell2humanlinux@gmail.com

No comments:

Post a Comment