PHYS 580   COMPUTATIONAL PHYSICS  SPRING 2005

Basic commands in Unix/Linux

ls list files in current directory
ls -l list files with properties (size, date, etc.)
ls -a list files including "hidden" files (i.e., starting with ".")
rm filename remove filename
cat filename write to screen filename
more filename same as cat, but only one pageful at a time
pwd print working directory
mkdir dirname create directory dirname
cd dirname change to directory dirname (must be subdirectory of current directory)
cd .. move up one directory
cd move to your root directory
cp file1 file2 copy file1 to file2
cp file1 dirname copy file1 into directory dirname (must be subdirectory...)
mv file1 file2 move (rename) file1 to file2 (deletes file1)
mv file1 dirname move file1 into subdirectory dirname (deletes file1 in current directory)
man command help information on command (not always helpful)
info command help information on command (not always helpful)
       NEW:
tar -cvf  tarfile.tar list creates archive file tarfile.tar from list of files (can be a directory)
tar -xvf tarfile.tar extracts files from archive file tarfile.tar
gzip filename.gz filename zips filename (can be tar file ) into compressed file filename.gz
gunzip filename.gz unzips filename from filename.gz

For transferring files between computers, use "scp" (secure copy)

scp file yourname@rohan.sdsu.edu:.  

scp file yourname@rohan.sdsu.edu:file  

scp yourname@rohan.sdsu.edu:file  file

scp yourname@rohan.sdsu.edu:file 

You will be asked for your password.

To log on remotely, the preferred protocol is "ssh"

ssh yourname@rohan.sdsu.edu

You will be asked for your password.