Just Enough UNIX. UNIX Operating System. Generally operates from a command-line. After logging on, met with command-prompt: grid x : In labs, you will be using X-windows on X-terminals. UNIX commands. All UNIX commands are actually programs.
Displays the names of the files in the current directory.
-a: shows all the files, including hidden ones
-F: puts a / after directories, an * after executables, and an @ after links
-l: displays a long listing of files
print working directory
Displays the full path of the current directory you are in.
Copies the contents of one file to another.
cp [file to copy] [new file name]
Copies a file from one directory to the working directory
cp [path of file to copy] .
Better name could be the rename command.
Changes the name of one file to another.
mv [old file name] [new file name]
Note that the [new file name] could be a directory, which will effectively move the file to the new directory keeping the original name.
Deletes the specified file or files.
This is destructive!
They are gone!
They cannot be retrieved!!!
rm [file name]
Note: this does not generally work with directories.
This creates a directory.
mkdir [new directory name]
Does not automatically change to the new directory after it is created.
This deletes a directory (as opposed to the rm command above).
The directory must be empty otherwise you will get an error.
drwx------ 2 jimd 8192 Jul 12 12:26 nsmail/
-rw-r--r-- 1 jimd 945 Mar 15 16:01 old.cshrc
-rwxrwxrwx 1 jimd 168 Jan 13 1998 file.exe
-rw-rw-rw- 1 nobody 382 Nov 18 1998 old.profile
-rw------- 1 jimd 652 Jul 12 12:16 old.xsession
drwx------ 2 jimd 8192 Jun 23 13:21 thesis/
-rw-r--r-- 1 jimd 1186776 Jul 13 15:07 win32tutorial.ps
chmod — changes the access mode of a file.
Two methods exist
chmod 644 index.html
chmod g+rw index.html
Change to be made