|
qstat
|
print list of all your jobs
|
|
qsub <script>
|
submit <script> as a job
|
|
qlogin
|
login to an interactive session on the cluster
|
|
qdel <job ids>
|
delete the jobs (<job ids> can be a pattern)
|
|
cd <destination>
|
change directory
|
|
ls [pattern]
|
list all files or match pattern
|
|
pwd
|
print current directory
|
|
rm [pattern]
|
remove files (-r for recursive)
|
|
mv [sources] [destination]
|
move / rename file(s) or folder(s)
|
|
cp [sources] [destination]
|
copy file(s) (-r to create desination)
|
|
mv [sources] [destination]
|
rename / move directory
|
|
mkdir <directory>
|
create a directory
|
|
rmdir <directory>
|
remove a directory
|
|
rm -rf <directory>
|
remove directory and all subdirectories
|
|
find . -file -name "*.txt"
|
Find all .txt files in the current directory and below and print
|
|
locate [pattern]
|
match files with pattern anywhere in the full path and print
|
|
head [filenames]
|
print first 10 lines of file
|
|
tail [filenames]
|
print last 10 lines of file
|
|
cat [filenames]
|
concatenate files and print
|
|
ps
|
See all of your active processes
|
|
top
|
Constantly updating list of ordered (by resources) processes
|
|
time <command>
|
print time taken to complete after command finishes running
|
|
kill <pid>
|
terminate process with id <pid>
|
|
{a..z} or {1..100}
|
expands to the series e.g a b c d ...
|
|
*
|
expands to match anything, any number of times
|
|
?
|
Match anything once
|
|
$((2 + 2))
|
Arithmetic expansion (evaluates to 2)
|
|
$(<command>)
|
expands to the result of the command
|
|
~
|
absolute path to home directory
|
|
awk -F ","
'{print $<column number>}' |
print only column n of files
|
|
sort (-n)
|
sort alphabetically (alphanumerically)
|
|
uniq (-c)
|
print only one instance of repeated lines (with count of lines)
|
|
grep (-i) [pattern]
|
print lines which contain pattern (ignore case)
|
|
wc -l
|
print number of lines
|
|
sed /<pattern>/<replacement>/g
|
replace all instances matching <pattern> with <replacement>
|
|
ssh <username>@<host>
|
login to multi-user machine
|
|
scp <username>@<host>:[remote source] <local>
|
Cope file(s) from <host> to <local> destination.
|
|
rsync -t <username>@<host>:[remote source] <local>
|
only copy updated files from <host> to <local>
|
|
chmod +x <file>
|
give executable priveleges to <file>
|
|
seq <start> <step> <stop>
|
print sequence of numbers from <start> to <stop> in increments of <step>
|
|
man <command>
|
open the manual page for man
|
|
more <file>
|
print output in navigateable pages
|
|
fdisk -l
|
list all the connected drives and partitions
|
|
mount <partition> <directory>
|
directory will now lead to the partiton (useful for usb storage)
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.