Professional Documents
Culture Documents
Download file rolllist.txt from http://www.cs.gsu.edu/~cscyip/csc3320/rolllist.txt, search and sort of this file.
2. search word Web and list the line number grep wn Web rolllist.txt
5. display lines which dont start with A,B,C, or D. grep ^[^A-D] rolllist.txt
7. display lines which include at least 2 successive 1 egrep 111* rolllist.txt egrep 11+ rolllist.txt 8. search lines which include Vi or Br
15. set . As separator , sort on the third field by numeric order sort t. +2 -3 n rolllist.txt
cat > file2 Hi, How are you? See you. See you Later. Dialog A
cat > file3 How are you? see you. See you later.
17. display the differences between file1 and file3 (try ignore case)
18. display the differences between file1 and file2 (try ignore case)
19. find c source files in the current directory or any of its subdirectories find . name *.c
20. find java source files in your home directory find $HOME name *.java
21. grant all exe files (extended name is exe) in the current directory or its subdirectories permission 777 find . -name '*.exe' -ls -exec chmod 777 {} \;
23. display the hard link count for file1 and file1link ls -l file1 file1link
rm file1link
32. copy all files and directories in your home directory into tartest cp r ~/* ~/tartest
34. archive tartest to tartest1.tar with gzip option tar zcvf tartest1.tar ~/tartest 35. display file size of tartest.tar and tartest1.tar ls l tartest.tar tartest1.tar
mkdir ~/tartest2
39. copy tartest1.tar to tartest2 and extract tartest1.tar in tartest2 cp tartest1.tar ~/tartest2 cd ~/tartest2 tar zxvf tartest1.tar