A wave of Linux commonly used file-related command small collation

Source: Internet
Author: User

Displays the size of each file under the current directory

The code is as follows:
Ll-h
(relative to LS-LH)

Displays the total file size of each folder under the current directory

The code is as follows:
ls | Xargs Du-sh

Space usage of the current server

The code is as follows:
Df-h

Total size of all files under current folder

The code is as follows:
DU-SMH *

View Files

The code is as follows:
Cat 1.txt | More
Tail-n 1.txt | grep UUID
Head-n 1.txt

File transfer

The code is as follows:
CP a.txt/tmp/
CP A.txt/tmp/b.txt
MV a.txt/tmp/
SCP A.txt username@10.20.134.199:/home/username/

. tar.gz File Decompression

The code is as follows:
Tar zxvf test.tar.gz

. tar.bz2 File Decompression

The code is as follows:
BZIP2-CD test.tar.bz2 >/tmp/test.txt

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.