Linux-Files/folders Common Operations Command

Source: Internet
Author: User

Command--help can be used by all commands to get help with command-carrying parameters

LS lists the files and folders under the current folder ls-a list files && folders (including hidden files) ls-l same ll, detailed information show

CD in and out of the directory, directly to the CD into the user's home directory CD. Parent directory CD/root directory

Touch < file name > create an empty file

File/folder copy and move

mkdir < directory name > build directory rmdir < directory name > remove directory RM Delete file, main parameters are-i,-f,-r

CP < source files > < target files > Copy files, main parameters are-R (copy together with subdirectories in homologous file) MV < source files/directories > < target files/directories > move files. The source file/directory has the same name as the destination file/directory, which means renaming.

File View

Head-n <file> Display the first n rows of a file, default to 10 rows

Cat <file> Display file contents cat <file1> <file2> Show file1,file2 file contents in turn the cat file1 File2>file3 will file1, File2 content is unified and directed to the File3 display.

More files displays the contents of the file, if the content is too long. You can press the space to make the next screen more +/search content file searches for the specified content inside the file

file Editing

File editing is a relatively complex and powerful piece, the main command is VI, currently Windows has gvim (Enhanced VI). Follow-up will be introduced.

PWD View your current directory

Linux-Files/folders Common Operations Command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.