UNIX Commands Cheat Sheet

Reviews
Shared by: elitecx764
Stats
views:
3
rating:
not rated
reviews:
0
posted:
11/5/2009
language:
English
pages:
0
UNIX Commands Cheat Sheet September 2, 2009 List: ls List all the files in the current directory ∼$ ls Present Directory: pwd Shows the current working directory (also called the current directory) ∼$ pwd Change Directory: cd Change the current directory ∼$ cd /users/priyanka/prog (Changes the working directory) ∼$ cd .. (Goes back one level up) ∼$ cd ∼ (Goes to your home directory) Remove: rm Removes (deletes) the specified file ∼$ rm prog1.c (Removes the file prog1.c from the current directory) Remove directory: rm -r Delete a directory and all the files inside it ∼$ rm -r /users/priyanka/old/ (Delete all the files under the ’old’ directory) Make directory: mkdir Create a new directory ∼$ mkdir newProgs (Creates a directory called ’newProgs’ in the 1 current directory) Copy: cp Copy the given file to another location ∼$ cp prog2.c /users/priyanka/new (Copies the file ’prog2.c’ from the current directory to the ’new’ directory ) Move: mv Move the given file to a new location ∼$ mv prog2.c /users/priyanka/new (Moves the file ’prog2.c’ from the current directory to the ’new’ directory ) Clear Screen: clear Clears the screen of old commands ∼$ clear Alternatively ’Ctrl + L’ also clears the screen :-) VIM Editor: vim Opens the VIM Editor to edit the given file ∼$ vim prog3.c (Opens the VIM editor to edit the ’prog3.c’ file in the current directory) C Compiler: gcc -o Compiles the input file with GCC Compiler and creates the executable output file ∼$ gcc prog1.c -o prog1 (Compiles ’prog1.c’ and creates output file ’prog1.out’) Show file: more Displays the contents of the given file ∼$ more prog1.c (Displays the contents of ’prog1.c’) 2

Related docs
UNIX Cheat Sheet
Views: 66  |  Downloads: 15
UNIX CHEAT SHEET
Views: 49  |  Downloads: 8
Unix Cheat Sheet
Views: 53  |  Downloads: 12
UNIX Cheat Sheet
Views: 52  |  Downloads: 9
Ed, The Original UNIX Text Editor, Cheat Sheet
Views: 437  |  Downloads: 35
UNIX Commands
Views: 708  |  Downloads: 126
UNIX C Shell Cheat Sheet
Views: 0  |  Downloads: 0
UNIX Linux Shell Cheat Sheet
Views: 19  |  Downloads: 9
premium docs
Other docs by elitecx764
r490
Views: 341  |  Downloads: 6
Form 2441 Child and Dependent Care Expenses
Views: 366  |  Downloads: 2
Company Memorandum Re Vacation Time Available
Views: 200  |  Downloads: 0
Sample interview script
Views: 1390  |  Downloads: 83
Shareholders Resolution Increasing Capital Stock
Views: 278  |  Downloads: 3
r491
Views: 319  |  Downloads: 3
Users marcsigal Desktop term papers ECON440F2005
Views: 233  |  Downloads: 0
Legal Action Against Your Company
Views: 297  |  Downloads: 6
Form 8829 Expenses for Business Use of Your Home
Views: 575  |  Downloads: 7
Sample Nondisclosure agreement
Views: 646  |  Downloads: 19
ASSIGNMENT OF CONTRACT ALTERNATIVE
Views: 351  |  Downloads: 2