Table of Contents

Archive Project

The biggest problem I encountered during the archive project was figuring out how to transfer the files from the server to my laptop. I ended up using the pscp command in the windows command prompt. Creating the archive and compressing it seemed straight forward. I like that the two can be separate that way you can create and archive without compressing it just to keep the files together. Also you can compress a single file without having to archive it.

Command List

who - shows who is logged on

 who [option] [file | arg1 arg2 ]
 

ls - list directory contents

 ls [option] [file]
 -l use long list format

chmod - change file mode bits

 chmod [option] mode[mode]... file...
 x - 1
 w - 2
 r - 4
 

ctrl c - to quite out of a command

cat - concatenate files and print on the standard output

 cat [option] [file]
 

echo - display a line of text

 echo [option] [string]
 

set - set or unset values of shell options and positional parameters

 set UID - sets user ID
 set GID - sets group ID

alpine - email service

cd - change directory

status unix - check attendance and grades for unix course

cal - calender

man [command] - manual page for command entered

date - current time and date

ncal - calendar and date of Easter

pom - phase of the moon

write - send a message to another user

 write user [ttyname]
 

tar - saves many files together into a single tape or disk archive, and can restore individual files from the archive

 tar [option] [file]
 -cf - create archive
 -xf - extract archive
 -z - gzip archive

gzip - compress or expand files

 gzip [option] [name]
 -1 though 9 - fast though best
 -d - decompress

vi/vim - programmers text editors

i - insert mode
esc - command mode

wc - print newline, word, and byte counts for each line

  1. l - newline count
  2. w - word count
  3. m - character count

head - output the first part of files

 head [option] [file]
 -c - print the first K bytes of each file
 -n - print the first K lines of each file

tail - output the last part of files

 file [option] [file]
 

sort - sort lines of text files

 sort [option] [file]
 

getent - get entries from Name Service Switch libraries

 getent database [key]
 getent passwd

bc - calculator

 obase - Hex base
 ctrl D - breaks out to prompt
 

groups - shows which groups you belong to

grep - print lines matching a pattern

 grep [options] pattern [file]
 

cut - remove sections from each line of files

 cut option [file]
 -b - select only these bytes
 -c select only these characters
 -f select only these fields

uniq - report or omit repeated lines

 uniq [option] [input [output]]
 -c - count
 -d - only print duplicate lines

tr - translate or delete characters

 tr [option] set1 [set2]
 

file - determine file type

ps - report a snapshot of the current processes

printf - formatted output conversion

alias - define or display aliases

Portfolio

unix