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

Shell Cmds

This document provides brief explanations of common Linux commands for listing, viewing, copying, moving, deleting files and directories. It explains that ls lists files in a directory, cat outputs files to the terminal, pwd prints the current directory, cd changes directories, cp copies files, mv renames or moves files, rm deletes files, rmdir deletes empty directories, and rm -r recursively deletes directories and their contents.

Uploaded by

Madhu Sundar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Shell Cmds

This document provides brief explanations of common Linux commands for listing, viewing, copying, moving, deleting files and directories. It explains that ls lists files in a directory, cat outputs files to the terminal, pwd prints the current directory, cd changes directories, cp copies files, mv renames or moves files, rm deletes files, rmdir deletes empty directories, and rm -r recursively deletes directories and their contents.

Uploaded by

Madhu Sundar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

ls List the files in the current directory. ls directory List the files in directory.

ls -l directory List the files in directory with extra information. ls -ltr directory List the files in directory with the newest files last. cat filename(s) Output the file or files to the terminal window. pwd Print the name of the current directory. cd Change the current directory to your home directory. cd directory Change the current directory to directory. cp existing-file new-file Copy existing-file to new-file. The original file still exists. mv existing-file new-file Rename existing-file to new-file. The original file no longer exists. rm filename Delete file filename. rmdir directory Delete directory directory. The directory must be empty. rm -r directory Delete directory directory including everything it contains.

You might also like