## A "pound sign" (far left) or a "hash mark" indiate a comment
## Unix does not use capital letters (in general) so I will
## use CAPITAL LETTERS to indicate "do something intelligent here"
A note on the UHDAS computer window manager:
(1) mouse button behavior
left: select text, double-click on icons
center: paste text
right: usually gives a menu
(2) KDE destop:
command "kedit" brings up a text editor
command "kedit FILE" will edit FILE
Gnome destop:
command "gedit" brings up a text editor
command "gedit FILE" will edit FILE
(3) UHDAS command "showlast.py" is very useful for monitoring data
logging.
showlast.py -a 6 #show last 6 Ascii lines of raw files
showlast.py -l 6 #show last 6 Logging (raw) files
showlast.py -r 6 #show last 6 Rbin (intermediate) files
showlast.py -g 6 #show last 6 Gbin (intermediate) files
UNIX command # what it does
-------- # --------------------------------
#---------------------- # looking at files -----
cat FILE # print the contents of FILE to the screen
head FILE # print the top of the file to the screen
head -40 FILE # top 40 lines
tail FILE # print the end of the file to the screen
tail -40 FILE # print the last 40 lines to the screen
less FILE # prints FILE to screen, one page at a time
# space bar goes down a page
# "b" key goes Back one page
# <return> goes forward one line at a time
# "q" Quits the file
# /TEXT searches for "TEXT"
grep STRING FILE # prints out all instances of STRING in FILE
# eg. "grep tty /home/adcp/configs/sensor_cfg.py"
# eg. "grep h_align /home/adcp/configs/cruise_proc.m__"
#---------------------- # file manipuation -----
cp FILE1 FILE2 # copy FILE1 to FILE2
rm JUNKFILE # remove (delete) JUNKFILE
mv FILE1 NEWNAME # move the file from FILE1 to NEWNAME
# like "cp FILE1 NEWNAME; rm FILE1"
#---------------------- # file properties -----
ls ABC* # list all files starting with ABC (like "dir")
ls *.m # list all files ending with ".m"
ls -l # long listing: permissions, size, owner, date
# sorted by name
ls -lt # long listing sorted by time (date)
ls -ltr # long listing with newest at the bottom
ls -lR # long listing, recursive
df # "Disk Full" (what is mounted and how full are they)
#---------------------- # getting around -----
cd # Change Directories (default is home directory)
# home dirctory for adcp is /home/adcp
cd DIRECTORY # Change Directories to DIRECTORY
pwd # Print Working Directory ("where am I?")
#-------------------------- # pipes ---------
#
# a pipe takes input on the left and sends
# output to the right
#
# commands are connected together with pipes to
# give the desired result
# ---------------------------------
cat FILE | less # same thing as "less FILE"
grep STR LONGFILE | less # sends all instances of STR to the screen
# in a managable manner (using 'less')
head -1000 FILE | tail -20 #print lines 980-100 in FILE
ls -ltr | tail # long listing of most recent 10 files
ls -lR | less # recursive long listing piped through 'less'
# ... and there are many more