The basic directory operation

1, the new directory (mkdir)

In the root directory of the new folder a:

In the root directory, create a new folder in a b

2, query the directory (ls, ls -a, ls -l)

ls

ls -a (show hidden files)

ls -l (ll) show details

ls -l

3、find

Query whether there is a folder b folder: find / a -name 'b'

Queries the root directory of the file containing the test folder:

4, modify the directory name (mv old new)

The root directory under a folder read aa:

5, modify the directory location (mv directory name / new location)

B The file folder in the folder aa, moved to the root directory:

6, copy (cp -r filename location)

The b aa folder to folder (-r expressed recursively, copying files may not be compressed, and -R & lt tape, must take folder):

7, delete

rm -r / Name

B delete a folder

rm -rf (forcibly removed, there is a gradual Tips)

 

Guess you like

Origin www.cnblogs.com/zhai1997/p/11265091.html