Linux directory and file operations

Source: Internet
Author: User

File naming rules:

1. Strictly case-sensitive;

2. The length cannot exceed 255 characters;

3. Cannot use/when file name

mkdir: Creating an empty Directory

-p:parent, parent directory, step-by-step creation

-v:verbose, printing details

Cases:

mkdir-pv/mnt/licai/a/m/mnt/licai/n

Mkdir-pv/mnt/licai/{a/m,n} (Command line expansion)

~username (wavy line expansion)

Create Directory A_b,a_c,d_b,d_c

MKDIR-PV/MNT/TEST/{A,D}_{B,C}

Tree + directory Name: View directory tree

Delete directory: rmdir, only empty directory can be deleted

-P

File creation and deletion

Touch: Changes the timestamp of the file. If the file does not exist, create the

-a:access, change access time only

-C: Do not create files

-m:modify, change the modification time only

-t:stamp, specify the time

Touch NEW: Create new file, cannot create new directory

Stat: Displays file or file system status information

Stat NEW: Displays information about the file new

Create a file using the file editor

Nano Hello

Delete files/directories: RM Hello

-i:interactive, Interactive

-f:force, forcing delete

-r:recursive, recursively delete directory

Rm-rf

\RM Hello Restore command itself

Command alias: Alias

RM, Rm-i

LS, ls--color=tty

Linux directory and file operations

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.