Linux notes (11)-File System Management

Source: Internet
Author: User

(1) File System view command: DF [option] [Mount Point]
-a displays all file system information, including special file systems such as/proc/sysfs
-H Use custom units to display capacity, such as KB,MB or GB
-t display file system type
-m displays capacity in megabytes
-K displays the capacity in kilobytes. The default is KB
(2) Statistics directory or file size: du [options] [directory or file name]
-a displays the disk usage for each sub-file. By default, only the disk footprint of subdirectories is counted
-H Use custom units to display disk footprint, such as KB,MB or GB
-S statistics total usage, without listing subdirectories and sub-file usage
The difference between Du and DF:
DF is taken from the file system, not only to consider the space occupied by the file, but also to count the space occupied by the command or program (the most common is that the file has been deleted, but the program does not free space)
The du command is file-oriented and only calculates the space occupied by the file or directory
(3) File system repair command: fsck [options] partition device file name
-A automatically fix file system without displaying user prompts
-y auto fix. is consistent with-a, but some file systems only support the-y
(4) Show disk status command: DUMP2FS partition device file name
(5) Mount: Mount [-l]
-L Query the system for devices that are already mounted,-l displays the name of the volume label
-A automatically mounts according to the contents of the profile/etc/fstab
-T File system: Add File System to specify the type of mount, can ext3, Ext4, iso9660 and other file system
-L Volume Label name: Mount the specified volume label partition instead of installing the device file name mount
-O Special option: You can specify additional options for mounting
Example: MOUNT/DEV/SR0/MNT/CD
(6) Uninstall: Umount
Example: Mount/dev/sr0
(7) Mounting USB stick
View USB flash drive device file name: fdisk-l
Mount-t vfat/dev/sdb1/mnt/usb/
NOTE: NTFS is not supported by default on Linux. FAT32 to VFAT

Linux notes (11)-File System Management

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.