11 June 2007 @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* UNIX EDITOR. edit myfile 14, $ PRINTS LINES 14 to the END. q QUIT g/Tuesday/l PRINTS ALL LINES CONTAINING HTE WORD Tuesday. 1, $ s/first/second/ substitute second for first in lines 1 to the end. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* QUota -v is the command for showing how muchdisk space s availabe adn used. df This tells how much free disk space there is. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* In some uNIx machines, the escape key finishes up the names of files, to save having to tpt hem all in. In Steel, if you press Tab while typing a filename, it will attempt to complete the filename. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* chown changes the owner. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* wc myfile will wordcoutnt a file. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* For sending ftp directories. cd /GUEST/websites/busecon tar -cvf 55.tar . ls -l ftp www cd www send 55.tar quite tar -xvf 55.tar rm 55.tar exit @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* PERMISSIONS If you set the permission to READ on a directory, then people can list the contents. Otherwise, they can't. chmod 666 myfile.te Everybody can read and write, but not execute. Good for text files. chmod 200 myfile.te Owner can write, but nobody can read or execute. chmod 777 read-write-execute for all. Good for directories that aresupposed to be open. chmod 444 is -r--r--r--. chmod 400 is -r-------- chmod 600 is -rw------- chmod 644 is read all, write owner. chmod 771 is that the owner can readwrite execute, and everybody can execute chmod 755 onwer can readwriteexecute, others can read and execute 4000 set user ID on execution (applies to executable files only) 2000 set group ID on execution (applies to executable files only) 1000 set sticky bit (see chmod(2) for more information) 0400 read by owner 0200 write by owner 0100 execute, or search if file is a directory, by owner 0040 read by group 0020 write by group 0010 execute, or search if file is a directory, by group 0004 read by others 0002 write by others 0001 execute, or search if file is a directory, by others For example, the absolute mode value that provides read, write, and exe- cute permission to owner, read and execute permission to group, and read and execute permission to others is 755 (400+200+100+40+10+4+1). The absolute mode value that provides read, write, and execute permission to owner and no permission to group or others is 700 (400+200+100). Read and write by owner, read by others. 400+200+40+4= 644. chmod -R 755 *.* Go through all those files and directories and give read and execute permission to everybdoy, write permission also to owner. http://kb.indiana.edu/data/acge.html?cust=0420774.4704.30 umask 022 for default permissions for new files to be 755 @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* rm -r * This removes all directories and files within them. (r for recursively) fmt 58 60 myfile.nam >newname This wraps to 60 character length files, and puts it ls in newname. wc myfile.nam This does a word count (and a letter count) @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* ls -al In Unix, this lists ALL files and LONG, so you gt the dot files and the byte size. passwd changes the password. sed -f myscript filein fileout the myscript files contains: s/lookfor/replacewith/g I never really got this to wrok. @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*