Zhangminghui-linux Basic Command Learning-5

Source: Internet
Author: User
Tags parent directory

"Let the summary become a habit"




PWD Prints the current working directory print working directory

Pwd-l

The default parameter for PWD is-l, which is the same as performing the PWD and executing pwd-l results, in fact using the environment variable pwd

Echo $PWD

Pwd

Pwd-l


Pwd-p

print the physical directory without any symbolic links

when we switch to the/ETC/INIT.D directory

actually, it's the same as switching to the/ETC/RC.D/INIT.D directory.

Execute the same effect

mkdir Creating directories Make Directory

Mkdir-p/bj/x/w/j to create a directory J, you must first create a/bj/x/w, or you already have/bj/x/w, and if you do not create the parent directory (if there is an error, make the parent directory as needed)

Mkdir/bj/x/w/j creation failed because the parent directory was not created first

Mkdir-p/bj/x/w/j created successfully, if there is no parent directory, the parent directory will be created as needed

mkdir-v

Display the creation process for a directory

MKDIR-PV parameter-PV often used in conjunction with

Create catalogs in batches (Create/xwj/dir1, Dir2, Dir3, dir ... dir10 and show the creation process)




relative path: Path not starting from/root


Absolute path: The path starting from/root



CD Switch Directory change directory

CD Default switch home directory

CD ~ Switch Home directory

CD-Switch to the last catalog CD-the system variable OLDPWD is called

Cd.. Switch to Parent directory




Tree lists the directory of files

Tree-a can also view the directory structure of hidden files

TREE-D directory structure only

Tree-l 2 only shows the structure of level 2 directories and files

TREE-DL 2 only shows the structure of level 2 directory

TREE-F displays the full path for each file or directory

TREE-DLF three parameters combined with the effect added

Tree-i does not display horizontal lines

Tree-dlfi parameters combined with the effect added

Tree-f ability to differentiate files and directories




Touch

1. No files, create files

2. Change the timestamp of the file (learn)

[Email protected] ~]# stat xwj.txt

Show the status of a file

Access time for access

Modify Modification Time

Change Time



[[email protected] ~]# touch-a xwj.txt access time and change time will change


[email protected] ~]# touch-m xwj.txt modification time and change time will change


Summary: Change changes with access

Change changes with Modify




Zhangminghui-linux Basic Command Learning-5

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.