7.linux File and directory management

Source: Internet
Author: User
Tags create directory
7.linux File and directory management

I. Paths and directories

1.1 Relative path and absolute path:

Relative path: Relative to the current directory's path

Absolute path: The path relative to/

1.2 Show current path and toggle current path

PWD Displays the absolute path of the current file

Cd. , .. ,-, ~ command use, CD/,cd/opt

1.3 Creating directories, renaming directories, deleting directories

mkdir Create directory, mkdir hzc0902, Mkdir–p hzc0902/test1/test2

MV Rename path mv hzc0902 hzc090201

RmDir Delete directory rmdir hzc0902, delete only non-empty directories

1.4 Environment Variables: View environment variables: Echo $PATH, add environment variable: path= "$PATH":/root

Delete environment variable I don't know yet.

Ii. Document and Directory Management

1.1 Viewing files and directories: LS

1.2 Copy, delete and move: CP, RM, MV

Third, data content access: Cat, TAC, NL, more, less, head, tail, OD, file creation: Touch

Iv. default permissions and hidden permissions for files and directories

  1. Umask Show Default Create Permissions
  2. File View Files Type

Five, command and file query

  1. which
  2. Whereis, locate, find

7.linux File and directory management

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.