Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the file size commands for viewing the Linux system

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This "Linux system to view file size commands have" article, the article sample code is very detailed, with a certain reference value, interested friends must refer to, for the "Linux system view file size commands what", Xiaobian sorted out the following knowledge points, please follow the pace of Xiaobian step by step slowly understand, then let us enter the topic.

1. Use the stat command to view the status information of a file that is generally used by the stat command. The output of the stat command is more detailed than the output of the ls command.

Oucanrong@zcwyou:~/iso$ stat ~ / iso/CentOS-6.10-x86_64-minimal.iso

File: / home/oucanrong/iso/CentOS-6.10-x86_64-minimal.iso

Size: 425721856 blocks: 831504 IO blocks: 4096 ordinary files

Device: 802h/2050d Inode:4471899 hard link: 1

Permission: (0664) Uid: (1000/oucanrong) Gid: (1000/oucanrong)

Last visit: 2018-12-23 21 purl 51purl 07.778850541 + 0800

Last modified: 2018-12-21 15 2414. 446276453 + 0800

Last modified: 2018-12-21 16 19 Vera 33.764230839 + 0800

Creation time:-

You can see that the file size is 425721856 bytes.

Linux uses the stat command to see the file size

two。 Using the wc command wc command is generally used to count the information of a file, such as the number of lines of text and the number of bytes occupied by the file.

Oucanrong@zcwyou:~/iso$ wc-c ~ / iso/CentOS-6.10-x86_64-minimal.iso

425721856 / home/oucanrong/iso/CentOS-6.10-x86_64-minimal.iso

3. Using the du command the du command is generally used to count the amount of space taken up by files and directories.

Oucanrong@zcwyou:~/iso$ du-h ~ / iso/CentOS-6.10-x86_64-minimal.iso

407M / home/oucanrong/iso/CentOS-6.10-x86_64-minimal.iso

4. Using the ls command ls command is generally used to view information about files and directories, including file and directory permissions, owners, corresponding groups, file size, modification time, path corresponding to files, and so on.

Oucanrong@zcwyou:~/iso$ ls-lh ~ / iso/ubuntu-18.04.1-live-server-amd64.iso

-rw-rw-r- 1 oucanrong oucanrong 812m December 21 15:23 / home/oucanrong/iso/ubuntu-18.04.1-live-server-amd64.iso

You can see that the size of ubuntu-18.04.1-live-server-amd64.iso is 812m.

5. Using the ll command (which is actually an alias for ls-l) in most Linux systems, the alias for ls-l has been set to ll, so there is no ll command, ll is just an alias command.

Linux uses the ll command to see the file size

Oucanrong@zcwyou:~/iso$ ll-h ~ / iso/ubuntu-18.04.1-live-server-amd64.iso

-rw-rw-r- 1 oucanrong oucanrong 812m December 21 15:23 / home/oucanrong/iso/ubuntu-18.04.1-live-server-amd64.iso

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

The above is all the contents of the article "what are the file size commands in the Linux system?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report