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 ./mydir | Changes to directory named "mydir" from current working directory | |
mkdir mydir | Creates 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 ./mydir | Changes to directory named "mydir" from current working directory |
No comments:
Post a Comment