Unix common command profile (2)

xiaoxiao2021-03-06  39

7) Copy the file

=========

Perform format: CP [-r] Source Destination

EXAMPLE:

CP file1 file2 copies file file1 into file2

CP file1 DIR1 Copy file file1 to the directory DIR1 file name still file1

CP / TMP / FILE1. Copy file file1 under directory / TMP to the current directory and file name is File1

CP / TMP / FILE1 FILE2 Copy file file1 under directory / TMP to the current directory file name file2

CP -R Dir1 Dir2 (Recursive Copy) Copy the entire directory

If the directory DIR2 does not exist, copy the directory DIR1 and all of its files and subdirectories.

To the directory DIR2 new directory name is DIR1 If the directory DIR2 does not exist

DIR1 and all its files and subdirects are copied for directory DIR2

8) Move or change the file directory name

=========================

Perform format MV Source Destination

EXAMPLE:

MV file1 file2 Change file file1 to file2

MV file1 Dir1 moves file file1 to the directory DIR1 down file name still file1

MV DIR1 DIR2 If the directory DIR2 does not exist, the directory DIR1 and all its files and sub-directory are moved.

To the directory DIR2 new directory name is DIR1 If the directory DIR2 does not exist

DIR1 and all its files and subdirectors are changed to the directory DIR2

9) Establish a new directory

==========

Perform format Mkdir Directory-Name

Exmaple

Mkdir Dir1 establishes a new directory DIR1

10) Delete the directory

=========

Perform format RMDir Directory-Name or RM Directory-Name

EXAMPLE

RMDir Dir1 deletes directory DIR1 but there must be no file in DIR1, no file cannot be deleted

RM -R DIR1 Delete Directory DIR1 and all files and subdirectories

11) Delete the file

=========

Perform format RM FileName (filename can be a file name or file abbreviation symbol)

EXAMPLE

RM file1 deletes file file name file

RM File? Deleting the four-character four vollations in File files in File

RM f * Remove all files named in F-name in the file

12) Arrangement symbol

==============

? Single word in the archive name

* Representing one of the strings in the file name

13) List the current directory location PWD

======================

Perform format PWD

14) View the contents of the archive

============

Perform format CAT filename

EXAMPLE

Cat file1 View file name File1 in a continuous display MORE FileName or Cat FileName | More

EXAMPLE

More file1 View file name File1 in paging

Cat file1 | more

15) View the catalog to the disk capacity

====================

Perform format: du [-s] Directory

EXAMPLE:

DU DIR1 Displays the total capacity of the directory DIR1 and the capacity of their second directory (with K byte)

DU -S DIR1 Displays the total capacity of the directory DIR1

16) View your own Disk Quota usage

===============================

Disk quota: Use limit for workstation disk space

Perform format: quota -v

EXAMPLE:

Quota -v will display the following message

Filesystem USAGE Quota Limit Timeleft Files Quota Limit TimeLeft

/ Home / Ice / U01

9344 8192 12288 1.9 Days 160 0 0

The column commentary:

USAGE: Current DVD

Quota: Your disk uses the amount when your usage exceeds Quota, although it can continue to use but

It is necessary to drop to Quota within seven days or if you do not have a super limit (the highest limit).

Write or copy any file again

LIMIT: Maximum usage is no longer written or replicated when your USAGE reaches Limit.

转载请注明原文地址:https://www.9cbs.com/read-69036.html

New Post(0)