"Linux" Managing Files and directories

Source: Internet
Author: User

PWD View current work path

CD into a folder ... Switch to Parent directory
/switch to the root directory

Ls-l view in long format that
-A view information for all subdirectories and files, hidden files can also be viewed
-D View the properties of the directory itself
-H See how big the catalog is
-R Recursive Display content

     **************************************      ???匹配单个字符        * 匹配多个字符     **************************************

Mkdir-p can create a multi-level directory Creation folder
RmDir can only delete an empty directory
Du-a Statistics All Files
-h is displayed in byte units, good looking!
-S occupies total space size per parameter

TOUCH-T//month-day hours divided by 8 mmddhhmm
File view information for specific files
Cp-r recursively replicate entire directory tree
-P Burst source file properties unchanged
-F Force overwrite files with the same name, folder
-I prompts the
Rm-f forcing a file or directory to be deleted
-I interactive Hints
-R Recursive Delete

MV Source File Destination file
Which view the folder where the command is located

Find [Find Range] [find criteria]
-name Name
-size size
-user File owner Lookup
-type File Type Lookup

Ln-s Creating a soft connection
Create a hard link

                    文件内容操作的命令

Cat-n can show the first few lines
Less pagination shows up and ends with Q exit
More pagination display, to the end of direct run
、、、、、、、、、、、、、、、、、、、、、、、
Blank next page carriage return next line B prev page Q exit
Less can page up and down, other features similar to more
、、、、、、、、、、、、、、、、、、、、、、、
Echo '*' > file1//Overwrite redirect
Echo '*' >> file1//chasing heavier orientation
HEAD-10 file name//view first 10 lines of information
TAIL-10 file name//view after 10 lines of information
-F//Dynamic view of the file after a few lines of information

Wc-l count rows
-W statistical number of words
-C Statistics byte number
Grep-i ignoring case-sensitive filtering
-V Reverse Lookup
^......... To begin with the expression of .....
... to the end of a ... $ representation with a.

Pipe Break: | The previous output as the following input

                     归档、压缩命令

Gzip gunzip/gzip-d
Bzip2 bzip2-d
TAR-C create a. tar format package file "-CVF-XVF more frequently"
-X Decompression
-V Output Details
-F Using an archive file
-T view the files in the package
-P Keep the original file information
-Z Simultaneous compression

"Linux" Managing Files and directories

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.