7.2.9 disk management commands

Source: Internet
Author: User

7.2.9 disk management commands
As an operating system, disk operations must be complete. In the Linux shell Command Line environment, there are many commands for disk operations, which can display disk usage, file format conversion, and disk formatting. The following describes common disk management commands in Linux and their usage.
1. du
Permission: all users.
Syntax: du [Option] [Names…]
Function: dudisk usage. This command step by step into each sub-directory of the specified directory and shows that the directory occupies 1024 bytes of the file system data block. If no Names is provided, the current directory is used for statistics on the disk space occupied by directories or files.
Parameter description:
-S indicates the total number of data blocks occupied by each Names parameter;
-A Recursively displays the number of data blocks occupied by files in the specified directory and sub-directories. If-s is not specified or-a is not specified, only the disk blocks occupied by each directory and Its subdirectories in Names are displayed;
-B lists disk space usage in bytes. The system uses K bytes by default );
-K lists disk space usage in 1024 bytes;
-C. Finally, add a total system default setting );
-L calculate the size of all files, and calculate hard-link files multiple times;
-X skipping directories on different file systems is not counted.
2. dd
Permission: all users.
Syntax: dd [Option]
Purpose: copy the specified input file to the specified output file, and convert the format during the copy process. You can use this command to implement the diskcopy command in DOS. first use the dd command to write the data on the floppy disk as a storage file on the hard disk, and then write the storage file to the second disk, to complete the diskcopy function. Note that you should delete the storage file on the hard disk with the rm command. Standard input files and standard output files are used by default.
Parameter description:
If = input file or device name );
Of = output file or device name );
Ibs = bytes: the number of bytes read from the buffer zone at a time;
Skip = blocks skip the ibs * blocks block at the beginning of the read buffer;
Obs = bytes: the number of bytes written to the buffer zone;
Bs = bytes: set the number of bytes in the read/write buffer at the same time to set ibs and obs );
Cbs = byte: one-time conversion of bytes;
Count = blocks: only copy the input blocks block;
Conv = ASCII converts an EBCDIC code to an ASCII code;
Conv = ebcdic converts ASCII code to EBCDIC code;
Conv = IBM converts ASCII code to alternate EBCDIC code;
Conv = block converts a variable bit to a fixed character;
Conv = ublock converts a fixed bit to a variable bit;
Conv = ucase converts lowercase letters to uppercase letters;
Conv = lcase converts uppercase letters to lowercase letters;
Conv = swab exchange each pair of input bytes;
Conv = do not stop processing when noerror occurs;
Conv = sync adjusts the size of each input record to the ibs size and fills it with NUL ).
3. fdformat
Permission: all users.
Syntax: format [-n] device
Purpose: this command is used to format a floppy disk. A floppy disk is one of the commonly used storage media. A floppy disk must be formatted before use, and data can be stored using commands such as tar, dd, and cpio, you can also create an installable file system on a floppy disk.
Parameter description:
-N the disk is not verified after being formatted.
Device specifies the device to be formatted. It is usually one of the following devices.
Development/dev/fd0d360
Development/dev/fd0h1200
Development/dev/fd0D360
Development/dev/fd0H360
Development/dev/fd0D720
Development/dev/fd01_20
Development/dev/fd0h360
Development/dev/fd01_20
Development/dev/fd0H1440

BibliographyPrevious sectionNext section

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.