2006/11/15

Basic Unix Commands

Basic Unix Commands



Navigational Commands


    To navigate around in Unix environment, the following commands will be useful.


    cd Change Directory
    pwd Prints Current working directory to the screen
    cd $HOME Changes to your Home Directory
    cd ./mydirChanges to directory named "mydir" from current working directory
    mkdir mydirCreates a new sub directory called mydir under the current directory
    ls Lists the contents of the files from the current directory

File Related Commands

Commonly used File operation commands. 
    cat ?myfile? displays the contents of the file named "myfile" onto screen. This command will be used if one wants to see the contents of a given file but not for editing the file.
    more ?file name? Same as the command "cat", except that this command displays the contents on the screen pausing for each screen. Pressing the spacebar displays the next screen. Is useful to check large files.
    vi ?file name?Opens up "vi" editor and opens the named file for editing. If the named file does not exists then creates a one.
    cd ./mydirChanges to directory named "mydir" from current working directory


No comments:

Post a Comment

File Handling with Python

This little utility is for copying files from source to target directories.  On the way it checks whether a directory exists in the target, ...