160 likes | 354 Views
CS 60 Discussion Review. Important Unix Commands. ls Options: -ltra pwd mkdir rmdir cd. Important Unix commands. cp Options: -r mv rm more/less cat echo. File Permissions. rwx: Read, Write, eXecute What do these mean for files/dirs Owner, Group, Others Example:
E N D
Important Unix Commands • ls • Options: -ltra • pwd • mkdir • rmdir • cd
Important Unix commands • cp • Options: -r • mv • rm • more/less • cat • echo
File Permissions • rwx: Read, Write, eXecute • What do these mean for files/dirs • Owner, Group, Others • Example: • chmod 754 file.txt
Redirection, Pipes • >, >> • < • |
Backquotes • cat `ls abc* |grep 123`
Processes • ps • pidof • kill -9
Background jobs • ^Z • bg • fg • &
Debugging • gcc -g • gdb <program> [core] • GDB commands • run • list • print • break • continue • step • next
Compiling • Compiling • Pre-Processing • Compiling/Assembly • Linking • Gcc • Options: • -o, -c, -l, -L • -W, -Wall, -g
More commands • find • Options: -name, -type, -maxdepth, -user, -exec • grep • Options: -r, -l, -n, -v, -I
Tars • tar -tvzf tarfile.tar.gz • tar -czf tarfile.tar.gz dir/ • tar -xvzf tarfile.tar.gz
Shells • What is a shell ? • csh, bash, etc • Setenv • PATH ? • .cshrc, .login, .logout
More commands • head • tail • cut • cut -f2 -d’ ‘ |head -10|tail -2
Shell Scripts • Examples