|
Unix
& Linux commands and tools use in CSE Labs
Checking
account details:
Account
details can be checked: acc or
pp
Disk
quota used: rquota
Detailed
disk usage: disk_guess
Detailed
print quota: priv pquota -v
IP
quota used: ipq
Account
details on web: https://status.cse.unsw.edu.au/Control_Panel/
Changing
brightness on iMac:
Changing
background brightness on iMac priv backlight <value>,
eg: priv backlight 8
File
management:
List
current directory contents: ls
-al
Remove
(delete) a file: rm -i
<fileName>
Remove
a directory: rm -ir <dirName>
Copy
a file: cp <fileName>
<newFileName>
Move
file or directory: mv
<fileName> <newFileName>
Display
current working directory pwd
Create
a directory: mkdir <dirName>
Change
working directory: cd
<dirName>
Check
a file type: file <fileName>
On-line
reference manuals: man
<command>, eg: man
ls
Maniputating
file:
Display
the contents of text file(s): cat <fileName>
Browse
the contents of a txt file per page: more <fileName> (press
q to quit)
Broswe
the contents of a txt file per line: less <fileName>, or
cat <fileName>|less
Display
the first 10 lines(default) of txt files: head <fileName>,
eg head -50 myProgram.java
Display
the last 10 lines(default) of txt files: tail <fileName>,
eg tail -20 <fileName>
Convert
txt files from DOS to Unix format: dos2unix <myDOSfile>
Convert
txt files from Unix to DOS format: unix2dos <myUnixfile>
Display
a bin file strings <bin fileName>, eg: strings
/bin/ls
Account
management:
Change
user password: passwd
Change
file access permissions: chmod <option> <fileName>
Compressing
files and directories:
Compress
a file: gzip <fileName>
or zip <fileName>
Decompress
a file: gunzip <fileName>
or unzip <fileName>
Compress
a directory: tar -cvf <archiveName >.tar
<dirName>
Decompress
a directory: tar -xvf <archiveName>.tar
Tar
and zip a directory: tar -zcf <archiveName>.tar.gz
<dirName>
Untar
a .tar.gz or .tgz file: tar -zxvf <fileName>.tar.gz
or
tar
-zxvf <fileName>.tgz
Decompress
files from rar archives: unrar x <fileName>.rar
Changing
the font size:
Inside an xterm press Ctrl+Button 3 (the right mouse button). The VT
fonts menu appears which allows you to change the font size of that
xterm.
Calculator
and math packages:
Scientific
calculator: xcalc
The
MathWorks known as matlab: matlab
Wolfram
Mathematica: mathematica (licence
server wolfram.lic.unsw.edu.au)
Mathematica
in text mode: math (Ctrl-d
and quit
to exit the interactive mode)
Arbitrary
calculator language: bc (quit
to exit the
interactive mode)
Word
document/spreadsheet:
Word
processor: openoffice
Text
editor: vim,
emacs
GNOME
spreadsheet application: gnumeric
View
pdf/ps file: acroread (or
xpdf)/ gv
Convert
a file from PS to PDF: ps2pdf <fileName.ps>
Convert
a file from PDF to PS: pdf2ps <fileName.pdf>
Printing
a text file using aps: aps <option> <fileName>
| lpr -P<printerName>
(for
more details about printing please see How
To Print From CSE Labs brochure)
Graphical
tools:
View
an image in .jpg, gif, png, etc... display/xview
<fileName>
Manipulate
and paint an image: gimp,
xfig
Convert
between image formats, size: convert
Screen
capture (for gnome-session) gnome-screenshot
-i
Using
USB stick/CD&DVD drive:
Mount/unmount
a USB stick priv usb mount/ priv usb umount
(the
USB should be unmounted before physically remove)
Mount/unmount
a CD/DVD priv cdrom mount / priv cdrom umount
(the
cd/dvd is mounted to /cdrom)
Reject
the CD/DVD after unmount eject
Please
refer to Using a USB memory-stick/drive brochure for more
detail
Useful
tools:
Use
man command
to find out: apropos,
cal, clear (ctrl+l), echo, date, du, find, locate, ps,
script, top, whereis, who, whoami
Book
commands:
Enter
into the booking system: book
Book
a terminal once in the system: book <start time - finish
time><day/ date>
Claim
a booked terminal: claim
Book
a terminal using a graphical interface: tkbook
Book
a terminal via web: https://status.cse.unsw.edu.au/Control_Panel/
CSE
Unix Primer
For
more details about Linux
commands: http://www.cse.unsw.edu.au/help/doc/primer/
|