Aqua Phoenix
     >>  Research >>  OOP  
 

Navigator
   
 
       
   

4. Introduction to UNIX

4.1 Summary

  • What is UNIX?
  • Some simple commands

4.2 Contents

4.2.1 What is UNIX?

4.2.2 Some basic commands

ACTION COMMAND DESCRIPTION
Make a directory mkdir DirectoryName Create a new, empty directory in your present location. You are only able to create directories in your home-directory or any sub-directory thereof
Change the Directory you are working in. cd DirectoryName Change your current location to the specified directory. If preceded with a slash (/), you will move absolute, otherwise relative to your current location
cd .. Change your current location in the file system to one directory above the one you are currently in
cd ~ Change your current location in the file system to your home directory
View a Directory's Contents ls Displays a list of all non-dot files and directories within your current directory. Dot files are files that begin with a dot (.)
ls -la Displays a list of all of the files and directories within your current directory plus additional information about the size of your file, the last time it was modified and the permissions on that file.
Move a file mv FileSource FileDestination Move the location of a file from one directory into another directory. FileSource is the name of the file; FileDestination can either be a directory or a new file name
Copy a file cp FileSource FileDestination Create a copy of a file in one directory and place that copy into another directory. FileSource is the name of the file; FileDestination can either be a directory or a new file name
Delete a file rm FileName Permanently removes specified file from current directory
rm -rf * Permanently removes all of the files and directories in your current directory. -rf denotes brute force and recursively removes all sub-directories
rm -rf *.extension Permanently removes all files in current directory with the specified extension
Remove an empty directory rmdir DirectoryName Permanently removes a directory from current directory
Change your Password passwd Interactively prompts for old and new password. Your password should contain numbers, letters, and symbols, so that no one can guess. Only the first 8 characters of what you enter are actually used for your password
Set Permissioning chmod 755 -R * Use 755 permissions in your public_html directory, in order to make all of your web page content available on the web
chmod 644 -R * Use 644 permissions for files and directories that you would like to make readable to everyone else on the system
chmod 700 -R * Use 700 permissions for all those files that no one, except for yourself, should be able to read
Table 1.1