Linux notes: Directory processing command LS,MKDIR,CD,PWD,RMDIR,CP,MV,RM

Source: Internet
Author: User

Format of the Linux command:
commands [-options] [parameters]
Cases:
Ls-la/etc

Command: LS
Command path:/bin/ls
Features: Displaying directory files
Usage: ls [-ALDH] []
Parameters:
-A view all files, including hidden files. The hidden files for Linux are "." At the beginning, if we want to set a file as a hidden file, in the new file with "." Start.
-h Displays the file size in an easy-to-read manner, such as k,m,g, rather than in bytes.
-L displays detailed information. 7 details are: File type and permissions, number of files being called, owner, owning group, file size, file Last modified time, file name. About file types and permissions, a total of 10 characters, the 1th character represents the file type (-: file, D: directory, L: Soft link), the last 9 bits every 3 a group, respectively, represents the owner of the U, the group belongs to the G, other people o read R, write W, execute x. There is a corresponding letter indicating that there is a corresponding permission, if "-" indicates that the permission is not available.
-D Displays directory information (not files and directories under directory)
-I view the inode number of the file.

Command name: mkdir
Features: Creating folders
Command path:/bin/mkdir
Usage: mkdir [-p] Directory name [multiple directories can be created at the same time]
Parameters:
-P recursive creation of required multi-level catalogs

Command name: CD
Function: Switch directory
Command path: Shell built-in command
Usage: CD directory
Other: Used in Linux. Represents the current directory, using the. Represents the top-level directory of the current directory

Command name: pwd
Function: Display the current directory
Command path:/bin/pwd
Usage: pwd

Command name: rmdir
Function: Delete empty directory (only empty directory can be deleted)
Command path:/bin/rmdir
Usage: RmDir directory name

Command name: CP
Function: Copy files or directories, all sub-files and directories will be copied
Command path:/BIN/CP
Usage: CP [-RP] original file or directory [can copy multiple files or directories simultaneously] target directory (can be copied at the same time renamed)
Parameters:
-R Copy Directory
-P Reserved File attributes

Command name: MV
Function: Cut file, rename
Command path:/BIN/MV
Usage: MV original file or directory destination directory

Command name: RM
Features: Deleting files or directories
Command path:/BIN/RM
Usage: RM [-RF] File or directory
Parameters:
-R Delete Directory
-F Enforcement (ignoring queries)

Linux notes: Directory processing command LS,MKDIR,CD,PWD,RMDIR,CP,MV,RM

Related Article

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.