Linux system common/Common basic command File directory management (create, delete, view,)

Source: Internet
Author: User

1. Path-related commands:

mkdir creates directory commands, common P options, increment creation, MKDIR-V, display creation process, MKDIR-VP, display creation process and direct creation.

Tree-like display, tree-c trees display color.

RmDir can only delete directories or similar-VP (cannot delete files, only empty directories can be deleted)

RM Delete files and directories, plus-R to directory operation, plus-F, remove ask whether delete (Force delete)

CP Copy to directory operation Plus-R rsync is also copy

MV Move or rename overwrite when plus absolute path does not prompt/bin/mv, plus v can also show the process


2. FILE-related commands

Cat view, can cat-a, opposite command TAC

More view as a percentage, press space to flip

Less view a screen turn, the arrow keys can be seen below, press G to the end of the line, press G to the beginning, j down, K upside down; ctrl+b upward, ctrl+f downward,

/content, can search/back content, n look down, n up,? Content, n look up, n look down

Head by default look at the first 10 lines, -20 see 20 lines

Tail by default look at the last 10 lines,-F dynamic View


3. File or Directory Properties

Ls-l/dev/Most front character

C-Character device file (monitor, keyboard mouse ...)

L Soft Connect file

B-Block device files (USB drive, disk)

s socket file (two program communication can be implemented)

P Pipeline File

The first character identifies the type of file

-Normal file

D catalog File

B-Block device files

C Character file

L Connection File

P Pipeline File

s socket file

Drwxr-xr-x. 2 root root 4096 March 17 04:00 111

1 2 3 4 5 6 7 8 9 10

1.D represents a catalog file

2.r=4 w=2 x=1, means the owner, the group, the other person's rights

3. SELinux-related, + ACL-related

4. There are several files that use the same inode number as the file, LS ID to view the file Inode,ls I

5. Owner

6. Genus Group

7. File size

8. Date

9. Time

10. File name



This article is from the Linux system Learning extension blog, so be sure to keep this source http://zhangxiaoxiong.blog.51cto.com/11657691/1785557

Linux system common/Common basic command File directory management (create, delete, view,)

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.