Linux Common commands

Source: Internet
Author: User

Create a directory: mkdir/tmp/xiaodianying
-P Recursive creation: Mkdir-p/tmp/japan/boduo Japan directory itself does not exist

"Ls-l" File list permissions detailed: Ls-1/tmp/japan
Create multiple files in one directory: Mkdir-tmp/japan/cangjing/tmp/japan/longze
List of "ls" Files: Ls/tmp/japan
Show current directory pwd (print working directory): PWD

Switch to the specified directory: cd/tmp/japan/cangjing
Go back to the top level directory: CD.

Show current directory pwd (print working directory): PWD
Top level directory for current directory: CD. There's a space in the middle

Delete an empty directory rmdir (remove empty directory): Rmdir/temp/japan/boduo can only delete an empty directory, if there are files under the directory, it can not be deleted, the actual application is not many

Copying Files Cp:cp/ect/grub.conf/tmp
Copy folder Cp-r: Cp-r/tmp/japan/cangjing/root
Copy multiple files simultaneously: cp/root/install.log/root/install.log.syslog/tmp
Copy the file and keep the file's properties: Cp-p/root/install.log
Copy directory and modify directory name: Cp-r/tmp/japan/longze/root/shenchao.18+

Clear all actions on the screen command: 1.ctrl+l, 2.clear

Cut: Mv/tmp/japan/cangjing/root or use not absolute path MV Cangjing/root
Modify the current file name: MV cangjing Canglaoshi
Delete a file: RM grub.conf
Force deletion of a file: Rm-f grub.conf
Delete a directory: Rm-rf/tmp/japan

CTRL + C terminates the current operation
Linux does not have the function of Recycle Bin

Linux Common commands

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.