0% found this document useful (0 votes)
9 views

Intro to Command Line

CMD

Uploaded by

mufadhal.hafizh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Intro to Command Line

CMD

Uploaded by

mufadhal.hafizh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

*Intro to command line*

1. Navigating Directories
-pwd (Print Working Directory): Shows the current directory you're in
-cd (Change Directory): Moves to another directory

2. Listing Files
-ls (List): Displays the contents of the current directory
-ls -l: Lists files in long format (with details like permissions, owner, and size)
-ls -a: Shows hidden files (files starting with a dot)

3. Creating Files and Directories


-touch: Creates an empty file
-mkdir: Creates a new directory

4. Managing Files
-cp (Copy): Copies files or directories, eg : cp -r dir1 dir2 # Copy directory
dir1 to dir2
-mv (Move/Rename): Moves or renames files or directories
-rm (Remove): Deletes files or directories

5. Viewing File Content


-cat (Concatenate): Displays the contents of a file
-more: Displays file contents one page at a time
-less: Similar to more, but allows both forward and backward navigation

6. Searching
-grep: Searches for text within files

You might also like