Linux Learning Path-linux file and directory management

Source: Internet
Author: User

This content comes from bird's private cuisine

1. Directory-related Operations

1.1 Special Directories

  • . Represents this Layer directory
  • .. Represents a previous level directory
  • -Represents a previous working directory
  • ~ Represents the home folder where the current user identity resides
  • ~account represents the account of the user's home folder

1.2 Basic operations of the Directory

  • CD: Switch directories
  • PWD: Show current directory
  • mkdir: Creating a Directory
  • RMDIR: Deleting a directory

2. File related Operations

  • Create a new file touch (you can also modify the file time)
  • Copy CP: Usually the source file has different permissions to the destination file, the owner of the destination file is usually the command operator itself, and the file's properties are related to the default property umask
  • Delete RM
  • Moving MV
  • View text file contents cat,more,less (common); View non-plain text file OD (especially for binary files)
  • Which look for execution files (look in the path variable); Whereis and locate look for files (in the database, may not find the newly created file); Find files (slow search on hard disk)

3. File Default Properties

The user creates the file, the default does not have the executable permission namely-rw-rw-rw-; The user creates the directory file, the default all permissions are open namely drwxrwxrwx;

The files and directories that are actually created also subtract the permissions default values set by Umask, for example: Umask value is 022

When creating a new file: (-rw-rw-rw-)-(----w--w-) ==>-rw-r--r--

The new directory is: (DRWXRWXRWX)-(----w--w-) ==>drwxr-xr-x

Linux Learning Path-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.