Linux disk management is mainly implemented by commands. Today, Xiaobian will sort out the commands for Ubuntu disk management, so that you can have a detailed understanding of the commands for managing disks. Interested friends. Let's take a look.
1 df -h for reporting the total capacity of the file system, the amount of the remaining capacity.
2 du -b /home View the capacity (k) of the current /HOME directory and the capacity (k) of the subdirectory.
3 fdisk -l View system partition information
4 fdisk /dev/sda Partition a new SCSI hard disk
5 mkfs.ext3 /dev/sda1 The first primary partition of a SCSI hard disk is formatted into an ext3 file system
# mkfs.ext2 /dev/sda2 Formatted into an ext2 file system
6 mount -t File System Type Device Path Access road
# File system type ISO9660 CD-ROM file system vfat Fat file system (windows) Mount CD-ROM drive
# mount –t iso9660 /dev/cdrom /mnt/cdrom Mount FAT
# mount –t vfat /dev/hda5 /mnt/cdrom Hang the fifth logical partition of the first ide
7 umount /mnt/cdrom Uninstall /mnt/cdrom is empty
8 chmod u+s file Add special permissions to the owner of the file
# chmod g+r file Add read permission to the file group sdb
# Chmod o+w file Add write permission to other users of file
# chmod ax file Subtract execution permission for all users of file
# chmod 765 file is a file genus The main set is full permission, the group is set to read and write rights, other users have read and hold permissions
9 chown root /home Change the owner of /home to root user
A common tool for partial disk space management is given:
df: Query the available or used storage space of the file system and the number of file information nodes.
du: Query the disk space occupied by each file or directory in the specified (or current —) directory.
find -size: Search for files of the specified size in the specified directory.
ls -s: Displays the size of the file in units of 1 KB data blocks.
cpio: used to create, dump or restore cpio archive files, to achieve backup and recovery of files or file systems, can also be used to achieve the replication of the overall directory hierarchy.
tar: Used to create, dump or restore tar archive files for backup and recovery of files or file systems.
dd: Used to implement raw data copying. You can copy files or even file systems (that is, entire disk partitions).
You can find out which directory is taking up the most space by using the du -h --max-depth=1 command.
My friendship: df du These two commands are very useful (see System The home Linux df command uses instance summaries).
The above is a summary of the Ubuntu disk management commands. With these command tools, we can view, organize, and access the disk. Have you learned?
After the Linux system is started, enter the GUI login environment. If you want to
Linux mail command is often used by system administrators. It is a very practical c
If you want to upgrade the latest CentOS system, or the systems own update is not to force, you have
The su-command under Linux is mainly used to completely switch to a user environment, and this comma
How to turn off alt shortcuts in Ubuntu system
Linux using the fdisk tool to create partitions
How to install and use Vsftp in Centos system
Steps for creating RPM packages for Linux systems
Linux vsftp prompt 530 Permission denied how to do?
Introduction to the usr directory in Linux
Linux vim comment color can't see how to change?
Getting Started with Linux Network Protocols
Ubuntu Unity online search only shows the skills of the terminal application
Steps to install GitLab on CentOS system
Ubuntu removes the emulator failure prompt "the android "XXX" virtual solution
Ubuntu install and switch Nvidia dual graphics driver method
Retrieving the lost flash memory in Win2003
Win8 switch to Legacy BIOS still can not install the original system
How to encrypt the disk of Win7 system?
Win8 uses Foxmail to send e-mail prompts "Receive password error" response method
Management problem solving caused by server virtualization
What should I do if the Win10 system does not update automatically?
Setting specific graphics steps for high-contrast display in Windows 8 system
What configuration is required to install win7 system
Small change file easy to crack - Thunder 5.9 new version of the member-only skin free with