Basic File Commands:
___________________________________________________________________________
|
|
| more filename
Displays a file on the screen and pauses |
|
at the end of each screenful. "Spacebare"|
|
scrolls down one page, RETURN one line |
|
at a time options.
|
| pg filename
Displays a file on the screen and pauses |
|
at the end of each screenful. RETURN |
|
scrolls down one page
|
|
|
| cat filename
Displays a file on the screen without |
|
pausing at the end of the screen. Use |
|
<CTRL><S> to stop screen output and
|
|
<CTRL><Q> to restart output. There will |
|
be a time delay before screen output can |
|
be stopped.
|
|
|
| cp filename newfilename
Make a second copy of a file.
|
|
|
| mv filename newfilename
Renames (moves) a file to a new filename.|
|
|
| rm filename(s)
Deletes (removes) one or more files. |
|
|
| rmdir directoryname
Deletes (removes) an empty directory. |
|_________________________________________________________________________|
Note: On standard UNIX systems there is
no built in undelete
command.
If a file is deleted with rm it is gone forever
unless
there is a copy of the file on tape backup.
Basic Directory Commands:
__________________________________________________________________________
|
|
| pwd
Shows your current connected directory.
|
|
|
| cd directory Changes your current connected
directory.
|
|
|
| ls
Gives a directory listing.
|
|
|
| ls -l
Gives a long form directory listing including
|
|
protections and file sizes. See the manual page for ls |
|
by typing man ls if you are interested in other options |
|
to the ls command.
|
|
|
| chmod filename Changes permissions to read, write or execute
a file |
|
e.g.: "chmod 777 *" gives read, write and execute
|
|
permission to everyone and to all files in the directory|
|
*="joker", for more information see
|
| http://www.sp.uconn.edu/workshops/unix.shell.basics.workshop.html
|
|
|
| ls -a
Gives a directory list of all files in the directory, |
|
including files which start with a ".". These are
|
|
typically parameter files and are normally invisible. |
|
|
| du
Shows the disk usage of the current directory.
|
|
|
| mkdir
Makes a new directory
|
|
|
| rmdir
Removes an existing empty directory.
|
|_________________________________________________________________________|
One should also be aware of the use of the following
UNIX directory
abbreviations:
____________________________________________________
| . Current working
directory
|
|
|
| .. Parent directory
of current working directory |
|
|
| $HOME User's home directory
|
|____________________________________________________|
Commands for Aborting Programs:
Usually it is best to leave programs using the quit or exit commands,
however
occasionally it is necessary to terminate a running program. Here
are some
useful commands for doing this:
__________________________________________________________________________
|
|
| <CTRL><C> Aborts a running program
without the option of restarting |
|
it later.
|
|
|
| <CTRL><Z> Pauses a program and
returns the user to the genes% |
|
prompt. The program can be restarted by typing fg
|
|
(foreground). If you type bg (background) the job will
|
|
also be started again, but in background mode.
|
|
|
| kill psid Kills a process with the given
process ID. This number is |
|
obtained using the ps command.
|
|
|
| <CTRL><D> Terminates a UNIX shell
such as csh or sh. Use logout to |
|
exit from your top level login shell. This command only |
|
work at the genes% prompt.
|
|_________________________________________________________________________|
Here are some commands which give information
about your login
sessions and jobs which you are running:
__________________________________________________________________________
|
|
| uptime Prints the current time, the length
of time the computer has |
|
been running since the last shutdown, the average number of |
|
users on the system, and the average system loads over 1, 5, |
|
and 15 minutes.
|
|
|
| ps Shows your
current processes and their status (running,
|
|
sleeping, idle, terminated, etc.).
|
|
|
| jobs Shows your active jobs
and their status (running or stopped).|
|
|
| top Shows the most
active processes on the entire machine and the|
|
portion of CPU cycles assigned to running processes. Press
|
|
"q" to quit from top.
|
|_________________________________________________________________________|
UNIX Command Summary:
Here is a reference list of some common UNIX commands.
___________________________________________________________________________
|_Command_________Function________________________________________________|
|
|
| <CTRL><C> Aborts a
command or program.
|
| <CTRL><D> Terminates
a UNIX shell level; closes a file.
|
| <CTRL><\> Toggles terminal
scrolling.
|
| <CTRL><S> Stops terminal
scrolling.
|
| <CTRL><Q> Continues
terminal scrolling.
|
| <CTRL><Z> Suspends
running job.
|
|_________________________________________________________________________|
|
|
| at
Submit script to the at queue for execution later.
|
| atq
Lists jobs waiting in batch queue
|
| atrm
Removes a job from the at queue.
|
| bg
Resumes a suspended job in background mode.
|
| cat
Shows file on screen. Can also be used to concatenate |
|
file.
|
| chmod
Sets file or directory protections.
|
| chsh
Changes login shell declaration.
|
| cp
Copies files.
|
| du
Shows disk usage of a directory and its files.
|
| emacs
Enters the emacs full screen text editor.
|
| fg
Brings a background job back into interactive mode.
|
| finger username Identifies a user.
|
| groups
List the privilege groups to which a user belongs.
|
| jobs
Shows active jobs and their status.
|
| kill
Kills a running process.
|
| logout
Ends your terminal session with ICGEBnet.
|
| ls
Shows listing of files belonging to a directory.
|
| ls -a
Shows listing of files including hidden files.
|
| ls -l
Shows verbose listing of files including protections, |
|
size, date created, and originator.
|
| man command Shows the on-line manual
page for a UNIX command. |
| more
Shows a file stopping at the end of each page. Can also|
|
move backwards or search for a specific pattern.
|
| mv
Renames (moves) a file.
|
| passwd
Changes account password.
|
| ps
Shows your processes and their status.
|
| quota
Shows disk usage and permanent and working disk quotas. |
| rm
Removes (deletes) files.
|
| script
Records terminal output to a file.
|
| stty
Sets various terminal parameters.
|
| talk
Interactively converse with another logged-in user.
|
| top
Shows the most active processes on the system.
|
| umask
Sets the file creation mask for file protections.
|
| w
Lists current logged-in users.
|
| who
Lists current logged-in users.
|
| whoami
Lists your username.
|
|_________________________________________________________________________|
The ancestor of this file was obtained from genes.icgeb.trieste.it