Linux Handy (file operation)

Source: Internet
Author: User

New Folder

mkdir  folder name

New file

Touch  file name

Renaming

MV  filename  new file name

Move the/a directory to/b and rename to C

mv/a/b/c

Delete a folder

RM-RF folder name

Deleting Files

Rm-f  file name

Querying files (folders)

Find/-name  ' filename '

Asterisks represent fuzzy search

Find/-name  ' * filename * '

VI Querying file contents

/query Content

VI Display line number

: Set Nu

Enter: N, the delegate jumps to the nth row, such as: 68, jumps to line 68th.

68

Remove M to n rows

: m,nd

VI Multi-line Delete detailed: http://blog.csdn.net/my2010sam/article/details/9287473

Extract

Unzip the TAR package

TAR-XVF compressed package name. Tar

Decompression tar.gz

TAR-XZVF compressed package name. tar.gz

Unzip zip

Unzip File.zip

Decompression Explanation: http://www.cnblogs.com/qq78292959/archive/2011/07/06/2099427.html

Linux Handy (file operation)

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.