Command List

From Research Computing Center Wiki
Revision as of 17:27, 5 February 2013 by Shtsai (talk | contribs) (Created page with "Category:Zcluster ===General Linux Commands=== ====Moving around in the file system==== {| width="100%" border="1" cellspacing="0" cellpadding="2" align="center" clas...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


General Linux Commands

Moving around in the file system

Command Action
pwd "Print working directory" - show what directory you are in.
ls List the contents (files and subdirectories) of a directory.
ls -l List the contents of a dir and show additional info of the files.
ls -a List all files, including hidden files, which typically start with a dot.
ls -lh List the contents of a dir and show additional info of the files (the files sizes are given in easy to read units).
ls -lt List the contents of a dir in cronological order with most recent files on top and show additional info of the files.
cd dirname Change to the dirname directory.
cd .. Go to the top level of your home directory.

Examining files

Command Action
file filename Determine the type of a file.
cat filename Concatenate a file.
less filename View text files and paginate them if needed.
more filename View text files, one page at a time.


Manipulating files and directories

Command Action
cp filename dirname Copy a file into a directory.
cp filename1 filename2 Copy a file into another.
cp -i filename dirname Copy a file into a directory and ask before overwriting.
cp -i filename1 filename2 Copy a file into another and ask before overwriting.
cp -r dir1 dir2 Copy a directory with its contents.
mv filename dirname Move a file into a directory.
mv filename1 filename2 Renames a file.
mv -i filename dirname Move a file and ask before overwriting.
mv -i filename1 filename2 Rename a file and ask before overwriting.
rm filename Remove a file.
rm -r dirname Remove a directory with its contents.
rm -i filename Ask before removing a file.
rm -i -r dirname Ask before removing a directory and its contents.
mkdir dirname Make a directory.
rmdir dirname Remove an empty directory.

zcluster specific commands

Command Action
quotarep Reports how much space you are using on the file systems
make_escratch Creates an ephemeral scratch directory, which is delete after 38 days (all contents will be deleted)

SGE commands

Command Action
qsub Submit a job to the queue
qdel Cancel a queued or running job
qhold Place a queued job on hold
qstat Check the status of queued and running jobs
qacct List properties of finished jobs
qstat -g c List all valid queue names