8.23 Lesson-2

Source: Internet
Author: User



Directory class:

mkdir, RmDir, tree, DirName, basename

mkdir command

When the-P parent directory is not present, create it together

-V Display procedure

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/F1/wKiom1XbC1TBNo5nAADRZdDmeD0109.jpg "/>

rmdir command

Delete Empty Directory

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/F1/wKiom1XbC1SBy33EAABgojeo9vo190.jpg "/>

There are files in the directory that cannot be deleted and prompt

Tree command

-l Specifies the display level

-D Display directory-only files at level

DirName command

View base Name

[Email protected] ~]# Dirname/etc/sysconfig/network-scripts/ifcfg-eth0

/etc/sysconfig/network-scripts

basename command

View file name

[Email protected] ~]# Basename/etc/sysconfig/network-scripts/ifcfg-eth0

Ifcfg-eth0

Text view:

Cat, TAC, more, less, tail, head

Cat command

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/ED/wKioL1XbDWniFaepAAA9NdfKFtk100.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/ED/wKioL1XbDWnDEcm2AACbQPqQViE515.jpg "/>

TAC display order opposite TAC

More and less, but more in the display after the exit, and less can go up and down, press Q to exit browse

Less command

ENTER Down Line

Space down one screen

b up one screen

Q exit

/keyword to find keywords from top to bottom

? keyword bottom find keywords

N Next

N Previous

Tail and head

-N Displays the specified number of rows

Tail Dedicated:-F

function is to view and not exit, you can see what is appended later

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/F1/wKiom1XbC1SDWra_AAA1qJyOqVg852.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/ED/wKioL1XbDWnjWDTjAABBQtQ3A58300.jpg "/>

In another terminal, append content, can be used to view the log for easy troubleshooting

Time Stamp management tool:

Touch command

Each file has three timestamps

Atime time of last visit, such as cat, more, less, etc.

Mtime the last time the content was modified

CTime the last time a property has changed


If no option is added, the three timestamp is updated to the current time

-A only modifies atime

-M modifies CTime while CTime is updated

-T Specify timestamp

Do not create when the-C file does not exist

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/F1/wKiom1XbC1ThMPxoAAGj43tGlVE436.jpg "/>

Timestamp format: Month day time. seconds

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/F1/wKiom1XbC1XiOCWAAACVLCHPVCs029.jpg "/>

If no option is added and the file does not exist, the file is created, plus-C does not create

File Management:

CP, MV, RM

CP command

-R Recursive replication

-D does not track symbolic links

-A equals-DR--preserve=all (Reserved attribute)

-I interactive reminders

-F Mandatory

-V Display procedure

MV Command

-I interactive reminders

-F Mandatory

RM command

-R recursion

-F Mandatory

-I interactive reminders


8.23 Lesson-2

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.