A few useful UNIX commands


To open a terminal window on facility workstations:
Hold down the right mouse button on the wallpaper of the screen.  The menu
will appear.  Select "Programs" and then select "Terminal".

Commands that can be used in the terminal window:
Note: .fid files are directories in UNIX

cd - change directory
	>cd
	takes you back to your home directory
	>cd ..
	go up one directory to the parent directory
	>cd /net/inova6001
	allows you to change directories from one facility workstation to
	another facility workstation

compress - compress a file to take up less disk space
	>compress data.tar
	you can make a tar file (see tar command) from a .fid directory and 
	then compress the data using this command.  This results in a
	file like:  data.tar.Z
	to reverse the compression:
	>uncompress data.tar.Z

cp  - copy files
	>cp  thisfile thatfile
	copies the contents of "thisfile" into a file called "thatfile"
	>cp -r directory1 directory2
	same thing only for directories
	>cp filename directory1/subdirectory1/.
	copy a file into another directory's subdirectory

du  - disk usage
	>du -k mydirectory
	You have to be in the parent directory of the directory you want to check.
	If you put in your username (this is your main directory), you
	can check your usage on the whole account.  Otherwise, you can
	also put in a subdirectory name and check the amount of disk
	space it takes up.

exit  - exits the terminal window
	>exit

ls  - list files and directories
	>ls   
	lists all of the files and subdirectories in the current directory
	>ls -l
	lists all of the files and subdirectories with dates and other info.

mkdir  - make directory
	>mkdir newdirectory
	creates a new directory called "newdirectory"

more - used to displaythe contents of a file without editing mode
	>more myfile
	displays the text of the file, page ahead with the space bar

mv  - move files
	>mv file1 directory2/.
	moves file1 into directory2 and calls it the same name(indicated
	by the period)

passwd - change your password
	>passwd
	You will be prompted for your old password and your new password
	(twice).  Use different cases and numbers in your password.

pwd - print working directory
	>pwd
	shows you the current directory you are in

rm  - remove files
	>rm junkfile
	removes a file you want to delete
	>rm -r junkdirectory
	>rm -r junk.fid
	removes a directory

rmdir  - remove directory
	>rmdir directory3
	>rmdir junk.fid
	.fid files are actually directories and have to be removed this way

tar  - tape archive - This command allows you to pack a directory into a
	"tar" file which acts like a single file.  So, you can store a 
	lot of data in one directory, pack it into a tar file and move
	it around like a single file.  You can then unpack it when you 
	want it.
	>tar -cvf directoryname.tar directoryname
	>tar -cvf data.fid.tar data.fid
	Creates a .tar file from the directory, "directoryname"
	>tar -xvf directoryname.tar directoryname
	>tar -xvf data.fid.tar data.fid
	Extracts the .tar file back into a normal directory.

telnet  - allows you to log into a computer remotely
	>telnet inova6001.biochem.umn.edu
	You will be asked for a username and password.  You may also be
	asked for the type of terminal - try s(sun), x(x windows) or use
  	the default.  In this mode, you can look at files on another
	computer or manipulate files in a UNIX terminal setting. 
	Remember to log yourself out and don't leave yourself logged in
	remotely to a workstation, especially the online stations.
		


Back