AIX OS commands for viewing folders and file sizes

Source: Internet
Author: User
Tags sort

If you use it, record it, lest you forget it.

1, DF-SG
Description: View the usage of each partition

2, du/local/notesdata/| Sort-nr | More
Description: The space consumption of all directories under the/local/notesdata folder is reduced by the size of the occupied space

3, du-a/local/notesdata/| Sort-nr | More
Description: The space consumption of all directories and files under the/local/notesdata folder is reduced by the size of the occupied space


Use DU-SG to see the size of the current folder (in G);
Use DU-SG filename to see the size (in g) of all files or folders under the current folder;

Du-sk, DU-SM are KB,MB units respectively.

Example:

root# ls-l
Total 8
-rwxr-xr-x 1 root System 42 July 28 19 O'Clock Test.sh
-rw-r--r--1 root system 0 July 28 19 o'clock Test_date
DRWXRWXRWX 3 root System 256 July 27 08 O'Clock Webalizer-2.21-02-src

When viewed with Ls-l, it is displayed in bytes, such as 42 for the actual size of test.sh, and 256 for WEBALIZER-2.21-02-SRC the size of the directory is 256byte (note that it does not refer to the size of the file under the directory)

View results with Du-sk:
root# Du-sk
3748.

View results with Du-sk *:
root# Du-sk *
4 test.sh
0 test_date
3744 WEBALIZER-2.21-02-SRC

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.