Home  >  Article  >  Operation and Maintenance  >  Share file creation and deletion in Linux

Share file creation and deletion in Linux

PHP中文网
PHP中文网Original
2017-06-20 13:07:572005browse

File naming rules:

1. Strictly case-sensitive;

2. The length cannot exceed 255 characters;

3. Cannot use / as a file name

mkdir: Create an empty directory

-p:parent, parent directory, create level by level

-v:verbose, print detailed information

Command line expansion :mkdir -pv /mnt/test/{x/m,y}

Wave line expansion: ~USERNAME

tree + directory name: View directory tree

rmdir: Remove empty directories

File creation and deletion

touch: Change the timestamp of the file. If the file does not exist, create it

 -a:access, only change the access time

 -c:Do not create any file

 -m:modify, only change the modification time

 -t: stamp, specified time

stat: Display file or file system status information

Create a file, use a file editor

nano hello

Ctrl + O: Save

Delete file/directory: rm hello

 -i: interactive, interactive

 -f: force, forced deletion

 -r: recursive, recursive deletion of the directory

 \rm hello recovery command itself

The above is the detailed content of Share file creation and deletion in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn