=== October 7, 2014 === wc -w displays the number of files (word count) ls -d prevents ls form looking into another directory a process is a program in action pid 2^16 =65536 starts @ 1 as long as there are pid to allocate everything will work fine ps - shows processes kill -1 PID hangs process kill -2 PID interrupts process ps aux | grep $USER AT&T sh - bourne shell bash - bourne again shell === September 30, 2014 === Wild cards wild cards operate on command line ? matches any single character * match 0 or more characters ls ???? [] match any character inside ls l* (match any beginning with l) ls *.zip (match any with .zip) [^] do not match anything inside ls *.tar* (match anything with .tar) ls ?[aeiou]? match any characters with any lower case vowel inside DATA PROC USE: wc, head, tail, grep, cut, |, sort, cat tr -translate, squeezes, and or deletes characters from std-in writing to std-out ascii man page man 7 ascii === September 25, 2014 === ps shows PID spawning / forking processes when a process creates another process there is no limit to processes on if one is put in place by administrator only the hardware and software limit the number of processes otherwise ulimit - look up the amount of resources you can or cannot use getent passwd - shows getent passwd | cut -d ’:’ -f1,7 | head -n 75 Quotes: * ‘ - full quote = literal quote * “ - half quote = allow for expansion (variable) * ` - back-quote = command expansion $__ this is how the shell (bash) denotes a environment variable $ means access === September 23, 2014 === Unix pipe | takes std-out and places into std-input |less - capable of many key bindings |more cat short for concatenate bc -l is for the calculator === September 18, 2014 === cp /etc/motd ~ absolute path for home dir (~ signify's home dir) Cat - looking at files ASCII 8 -bit code Cat -n - shows line # Cat -e - puts $ at the end of lines Tries to show all files as one of 256 symbols white space characters * tab * space * backspace : extended command mode Ctrl - S locks the terminal Ctrl - Q unlocks the terminal $ means end of line od / octodump of the file od -x for hex dump grep globally search regular expression print grep ‘the’ looks for the expression the in the give files grep ‘\’ / looks for just the word the grep -i ‘’ - looks for upper and lowercase version of given variable grep -o ‘’ - just shows the matching text grep -n ‘’ - displays line # Pipe | - takes the output and send it to the input of another command Pipe anything that send to std out like ls/who od -x /ect/motd | grep -o '0a' |wc -l endianess little endian : lower order big endian: higher order network communication is big endian intel machines use little endian === September 11, 2014 === tail used to see the end of a file tail -f can see all changes as they are taking place cat allows you to see the contents of a file on the std out (the screen) nearly any file can be inputted or outputted from std-out Symbolic link - file that points to another file object file executable - binary file set vid -gives root access set gid -assign group privileges bin - located in \bin contains most normal user commands sbin \sbin administrator commands submitting projects from wiki $ submit unix "nameofproject" "webaddress(fullwebaddress)" should say submitting unix project "name" "web address" successfully submitted == intro to VI - full screen line editor == i = insert I = insert at the end a = append A = append at the end VIM is improved version of VI, HJKL are = to arrow keys W = skips words 4W = skips 4 words and so on B is back $ goes to the end of the line 3G, goes the third line X is delete, x is backspace dw, db, dW, dB - delete by word d^, d$, dd p is paste S - substitute cw cb cW cB - change word c^, c$ o = insert new line below O = insert new line above cursor y = yank yw = yanks into a buffer /”char” brings the cursor to the word n goes to next, N goes back :w “filename” saves files :w if you already put filename when starting Vi “filename” :q exit VI no saving just exit :q! === September 9, 2014 === status unix this command will show attendance, opus and project status cal will give you the current month & day cal 2014 will give you the yearly calendar cal 04 2014 will show a specific month calendar date by default will give you the day month time time:zone year TUE SEP 9 16:30:30 EDT 2014 you can reformat the date string date -d 2014 08 03 "j" %J will give date of the current month %s will give you the amount of time since the beginning of time 1970-01-01 00:00:00 utc pom - phase of moon will display the moon phases man - for manual page or pages write - to write to another user talk - works like instant message /ect directory contains many system config files shadow - is where encrypted passwords would be saved if on a stand alone system the motd resides within /ect cat motd shows you the banner /lid - system libraries reside here ldd will show shared library dependencies everything is organized in both unix and linux /media - common mount points /proc -process infromation psendo-filesystem will show process id's each sub dir is a process id /sbin -system binaries /tmp - were temporary data is stored permissions are drwx rwx rwx user group global /van collection of everything, not really any specific /usr compiler is located here /usr /bin tools in here /usr /lib supporting libraries === September 8, 2014 === {{:opus:fall2014:ddewert1:v4-dir.gif?200|}} everything is underneath one file system even if something is mounted pwd shows current directory cd allows for changing of directories cd . current dir navigation cd .. relative path, takes to parent dir absolute path is a specific address that works from any location universally specific echo - simple print statement that will come out the std out (> redirects std out to file "writes") (>> redirects std out to file "appends") 2> redirects std err "writes" 2>> " " appends === September 4, 2014 === Unix Philosophy * Small is beautiful * Do one thing and do that one thing well * Everything is a file 3 types of files * Regular/ ordinary * directories(links)(metadata) * Special- Manifestation of hardware ie(keyboard,screen mouse...etc...) 3 tiers of ownership user group other(world/global) dwrx wrx wrx d for dir Special = B, C, P, S R- read 4 in octal W- write 2 in octal x- execute 1 in octal - no permission 0 in octal Permissions uses octal # system to give permissions there is no un-delete option- only the superuser has this option however, this does not protect this file from being over written If the data is over-written in the swap file system then the file/ data cannot be retrieved === September 2, 2014 === My user name: ddewert1 pass:dy****** to remote on to lab 46 ssh ddewert1@lab46.corning-cc.edu to detach from the server ctrl + a + d for class chat irssi /server irc /join unix /join lab46 common commands who - shows who is on the system at that instant ls -l list dir's and or files in current dir pwd alpine for email lab46:~$ this is your user home dir there are 2 regular states regular and superuser :~/src$ --- directoy ====September 26, 2014==== This is a sample format for a dated entry. Please substitute the actual date for "Month Day, Year", and duplicate the level 4 heading to make additional entries. As an aid, feel free to use the following questions to help you generate content for your entries: * What action or concept of significance, as related to the course, did you experience on this date? * Why was this significant? * What concepts are you dealing with that may not make perfect sense? * What challenges are you facing with respect to the course?