Linux Getting Started General Command

xiaoxiao2021-03-06  65

1.Linux enters the Linux system to enter the Linux system: You must enter the user's account, you can create the following two accounts during the system installation: 1. ROOT - Super User Account (System Administrator), use this account to do anything in the system. 2. Ordinary users - This account is used by the Push Tutong user, which can be performed. All general Linux users are ordinary users, and the system administrator usually uses the super user account to complete some system management work. If you only need to complete some tasks that are capable of completing by ordinary accounts, it is recommended not to use a super user account to avoid unintentionally destroying the system. Affect the normal operation of the system. User login is two steps: The first step, enter the user's login name, the system identifies the user according to the login name; the second step, enter the user's password, the password is a string set by the user yourself, which is confidential for other users. It is a keyword for system to identify true and false users when logging in. When the user correctly enters the username and password, it can legally enter the system. Screen display: [root @ loclhost / root] # This time you can do a variety of operations. Note that the super user's prompt is "#", and other users' prompts are "$". Modify the password to better protect user accounts, Linux allows users to modify their passwords at any time, modify the password command is Passwd, which will prompt the user to enter the old password and new password, and then ask the user to confirm the new password again to avoid The user is inadvertently pressing the wrong button. If the user forgets the password, you can apply to the system administrator to reset one for yourself. Virtual Console Linux is a real multi-user operating system that can log in simultaneously. Linux also allows a user to log in multiple times because Linux and UNIX provide a virtual console access method, allowing users to log in multiple times from the console at the same time. The selection of the virtual console can be implemented by pressing the Alt key and a function key, usually using F1-F6, for example, after the user is logged in, press the ALT-F2 key, and the user can see "Login:" prompt, explain the user. I saw the second virtual console. Then press the ALT-F1 button to return to the first virtual console. A newly installed Linux system default allows users to use the ALT-F1 to Alt-F6 keys to access the first six virtual console. The virtual console allows users to work on multiple console and truly embody the characteristics of multiple users in Linux systems. The user can switch to another virtual console when the work is not ended on a virtual console. Exit the system whether it is a super user or a normal user, when you need to exit the system, type the exit command at the Shell prompt.

The copy, deletion, and movement command CP command is that the function of this command is to copy the file or directory to another file or directory, just like the Copy command under MSDOS, function is very powerful. Syntax: CP [Option] Source File or Directory Target File or Directory Description: This command copies the specified source file to the target file or copy multiple source files to the target directory. Each of the commands is as follows: - a This option is usually used when copying. It retains links, file properties, and recursively copys the directory, which is equal to the combination of DPR options. - Reserved link when D copy is copied. - f Delete the existing target file without prompting. - The I and F options are reversed, which will give a prompt before the target file is overwritten to require the user to confirm. When the answer y, the target file will be overwritten and is an interactive copy. - P At this point, CP will also copy its modification time and access to the new file in addition to copying the contents of the source file. - R If the source file given is a directory file, the CP will recursively copy all the subdirectory and files in the directory. At this point the target file must be a directory name. - l Does not copy, just link files. It should be noted that in order to prevent the user from using the CP command to break another file in inadvertently, if the user specified target file name already exists, after copying the file with the CP command, this file will be overwritten by the new source file, so It is recommended that users use the I option when using the CP command to copy files. MV command users can use the MV command to change the file or directory to another directory for the file or directory. This command is like a combination of REN and MOVE under MSDOS. Syntax: MV [Option] Source File or Directory Target File or Directory Description: Different in the second parameter type in the mv command (Is the target file or target directory), the mv command renames the file or moves to a new one. Directory. When the second parameter type is a file, the mv command completes the file rename. At this time, the source file can only have one (or a source directory name), which rename the source file or directory to a given Target file name. When the second parameter is an existing directory name, the source file or directory parameter can have multiple, the MV command moves the source file specified by each parameter to the target directory. When moving files across file systems, the MV copy, then delete the original file, and the link to the file will also be lost. The meaning of each option in the command is: - i interactive operation. If the MV operation will result in overwriting the existing target file, at which point the system is inquiry, requiring the user to answer Y or N, which avoids erroneous overwriting files. - F prohibits interactive operation. When the MV operation is to override an existing target file, the I option will no longer work after specifying this option. If the destination file (not a directory) already exists, the content of the file will be overwritten by the new file. To prevent users from using the MV command to break another file, use the mv command to move files, it is best to use I option. RM command users can delete unwanted files with the RM command. The functionality of this command is to delete one or more files or directories in a directory, and it can also be deleted with all the files and subdirectories under a directory. For link files, just disconnect the link, the original file remains unchanged. The general form of the RM command is: RM [Options] File ... If you do not use the RE option, RM does not delete the directory. The all of the options of this command is as follows: - f ignores the files that do not exist, never given a prompt. - R indicates that RM is recursively deleted all directories and subdirectories listed in the parameters. - i interactively deleted. Be careful with the RM command. Because once the file is deleted, it cannot be recovered. It is prevented from occurring in this situation, you can use I option to confirm the file you want to delete one by one. If the user enters Y, the file will be deleted.

If you enter anything else, the file will not be deleted. The Linux directory creation and delete command mkdir command function: Create a directory (similar to MD command under MSDOS). Syntax: MKDIR [Option] DIR-NAME Description: This command creates a directory named by DIR-NAME. Users requiring a directory in the current directory (in the dir-name of the Dir-Name) have write permissions, and DirName cannot be a directory or file name in the current directory. The meaning of each option in the command is: - m Set access to the new directory. You can also set with a chmod command. - p can be a path name. If some directories in the path do not exist, after adding this option, the system will automatically establish a directory that does not exist, that is, multiple directories can be created once. RMDIR Command Function: Delete the empty directory. Syntax: RMDIR [Option] DIR-NAME Description: DIR-NAME represents a directory name. This command deletes one or more subdirectories from a directory. It is important to note that a directory must be empty before being deleted. The RM - R DIR command can replace RMDIR, but there is danger. You must also have write access to the parent directory when you delete a directory. The meaning of each option in the command is: - P recursive delete directory DIRNAME, and when the child directory is deleted, it is also deleted together. If the entire path is deleted or reserved for some reason, the system displays the corresponding information on the standard output. CD Command Function: Change the work directory. Syntax: CD [Directory] Description: This command changes the current directory to the directory specified by Directory. If Directory is not specified, return to the user's home directory. In order to change to the specified directory, the user must have execution and read permissions to the specified directory. This command can use wildcards (see Chapter 10 of the wildcard mean). In the Linux hierarchical directory structure, the user can use the mkdir command to create a new directory in any of the authorized directories, or use the CD command to switch from a directory to another. However, there is no prompt to tell the user which directory is currently in. To know the current directory, you can use the PWD command that displays the entire path name. Syntax: PWD Description: This command shows the absolute path of the current work directory. The ls command ls is an English word List, its feature is the content listed in the directory. This is one of the most common commands of users, as users need to view the content of a certain directory from time to time. This command is similar to the DIR command under DOS. Syntax: LS [Option] [Directory, or File] For each directory, this command will list all subdirectories and files. For each file, the LS will output its file name and other information required. By default, the output entries are sorted in alphabetical order. When the directory name or file name is not given, the current directory is displayed. The meaning of each option in the command is as follows: - a Display all subdirectories and files in the specified directory, including hidden files. - a Display all subdirectories and files in the specified directory, including hidden files. But not listed "." And "..". - b Display the non-display character in the file name with an octal escape character. - c Sort by the modification time of the file. - C is divided into multiple columns display. - D If the parameter is a directory, only its name is displayed without displaying each file. Often use together with the L option to get detailed information on the directory. - f is not sorted. This option will make the LTS option to fail and make the AU options are valid.

- f Tag "/" after the directory name "/", the executable "*", the symbol link is marked "@", the pipe (or FIFO) after marking "@", pipe (or FIFO), "=" after the SOCKET file. - i Node i node I display file in the first column output. - l Details of the file in a long format. This option is most commonly used. The information listed in each line is: File Type and Permissions Link Document The main file genus file size creates or recently modified time names After the symbolic link file, the displayed file name has "->" and reference file path name. For device files, its File Size field displays the primary, secondary device number, not the file size. The total number of numbers in the directory displays the beginning of the long format list, which contains an indirect block. - L If the specified name is a symbolic link file, the file pointed to by the link is displayed. - m Output by a character flow format, the file is displayed, and the comma is separated. - N The output format is the same as the L option, but only in the output of the file owner and the group group are represented by the corresponding UID number and the GID number, not the actual name. - O is the same as the L option, but does not display the owner information. - p After adding a "/" behind the directory. - q Use "?" instead of "?" in the file name. - r Displays the output results in an alphanist or first priority order. - R Credit Displays files in each subdirectory of the specified directory. - S gives the number of blocks used in each directory, including indirect blocks. - T is displayed in the modification time (recently priority) instead of by the name. If the file modification is the same, it is in the dictionary order. The modification time depends on whether C or U selection is used. The default time tag is the last revision time. - U shows the time (recently priority) of the last file (recently) instead of being sorted by name. The time tag of -t is to modify to the last time. - X The information of each row is displayed by row. In the information displayed by the LS - L command, the beginning is a string consisting of 10 characters, where the first character represents the file type, which can be one of the following types: - Ordinary file D directory L Symbol link B device The 9 characters behind the file C character device file indicate the access rights of the file, divided into 3 groups, 3 digits per group. The first group represents the authority of the file owner, the second group represents the authority of the same group, and the third group represents the permissions of other users. The three characters of each group indicate read, write, and execution permissions for files, respectively. Each permission is as follows: R read W writes X execution. For the directory, it means enters permissions. S When the file is executed, the UID or GID of the file is given the UID (user ID) or GID (group ID) of the process. T Set the flag bit (stay in memory, not being swapped out). If the file is a directory, the files in this directory can only be deleted by the superuser, directory owner, or file owner. If it is an executable file, after the file is executed, the pointer to its positive segment remains in memory. This will then load the file faster when it is executed again. The Linux Text Processing The function of the Sort Command Sort command is sorted in each line in the file. The sort command has many very useful options that are originally used to perform various sorted file contents for the database format. In fact, the sort command can be considered a very powerful data management tool to manage content similar to database records. The sort command will be sorted by the contents of the file. If the first character of the two rows is the same, the command will continue to compare the next character of these two lines, if it is also the same, will continue to compare. Syntax: Sort [Options] file Description: Sort Commands Sort all rows in the specified file and display the results on the standard output.

If you do not specify an input file or use "-", the sorting content is from standard input. Sort Sort is done according to one or more keywords extracted from the input row. Sorting keywords define the smallest character sequence used to sort. By default, you are sorted in the ASCII character sequence in a single behavior keyword. Change the options for the default settings Mainly: - M If a given file has been served, the merge file. - C checks if a given file is ranked, if they do not have a sequence, print an error message and exit in status value 1. - u On only one line of rows, only the same line is left. - O Output file writes the sorting output to the output file instead of the standard output, if the output file is one of the input files, Sort first writes the contents of the file into a temporary file, then sort and write the output result. Changing the options for the default sorting rules These are: - d Sort by dictionary, only letters, numbers, spaces, and tabs are meaningful when compared. - f Treat your lowercase letters with uppercase letters. - i ignores non-print characters. - m compares as a month: "Jan" <"feb" - r Sampling results in advance. POSL - POS2 Specifies one or several fields as sorting keywords, field position starts from POSL, until POS2 (including POSL, does not include POS2). If POS2 is not specified, the keyword is from POSL to the end. The position of the field and characters starts with 0. - b Look for a blank (spaces and tab) that ignores the predecessor (spaces and tabs) when sorting the keywords in each row. - T separator Specifies the character Separator as a field separator. The UNIQ command file will have a repetition line in its output file after processing. For example, after using the CAT command, you can use the sort command to sort, you may have a repeated line. At this time, you can use the UNIQ command to remove these repeat lines from the output file, leaving only the only sample of each record. Syntax: UNIQ [Options] file Description: This command reads the input file and compares the adjacent rows. Under normal circumstances, more repeated rows will be deleted in the second and later, and the line comparison is based on the sort sequence of the set character set. The result of this command is written to the output file. Enter files and output files must be different. If you enter a file with "-", you are read from the standard input. This command has the following options: - C Display Output, plus the number of times the Bank appears in each line of the file. It can replace the U and-D option. - D shows only the repeated line. - u Only lines do not repeat in the file. - n The front n field is ignored with the blank before each field. A field is a non-air, non-made string string, separated from each other (fields from 0). n The n characters before it is ignored, and the previous character is skipped (the character is numbered from 0). - f N is the same as - n, where n is the number of fields. - S n is the same as N, where n is the number of characters. Linux Backup and Compressed Command Tar Command TAR can create files for files and directories. With TAR, users can create files for a particular file (backup file), or change files in the file, or add new files to the file. TAR was originally used to create files on tape, and now users can create files on any device, such as floppy disk. With TAR commands, you can pack all a lot of files and directories into a file, which is very useful for backing up files or combining several files into a file for network transmission. TAR on Linux is a GNU version.

Syntax: TAR [primary option counseling] file or directory uses this command, the master option must be, it tells Tar to do something, the counseling is auxiliary use, you can choose. Main options: c Create a new file file. If the user wants to back up a directory or some files, select this option. R Put the file you want to archive to the unlucky of the file file. For example, the user has made a backup file, and there is also a directory or some file forgot backup, then you can use this option to add a directory or file to the backup file. T list the contents of the file file, see which files have been backed up. u Update the file. That is to say, replacing the original backup file with a new file, if you can't find a file in the backup file, append it to the last of the backup file. x Release files from the archive file. Auxiliary Options: b This option is set for the tape drive. Then follow a number, used to explain the size of the block, the system preset value is 20 (20 * 512 bytes). f Use the file or device, this option is usually necessary. k Saves the already existing file. For example, we restore a file, during the restore, encounter the same file, and will not be overwritten. M When restoring the file, set the modification time of all files to now. M Create a multi-volume file to store in several disks. v Detailed report information of TAR processing. If there is no such option, TAR does not report file information. W Each step is required to confirm. z Use GZIP to compress the / to decompress files, add this option to compress the file file, but must also use this option to decompress when it is restored. There are two obvious advantages of the Gzip command to reduce the file size, one is to reduce the storage space, and the second is to reduce the transmission time when transmitting files through the network. Gzip is a command to compress and decompress the files in the Linux system, which is convenient and easy to use. Syntax: Gzip [Option] Compressed (Decompressed) File Name The meaning of each option: -c Write the output to the standard output and retains the original file. -d will decompress the compressed file. -l For each compressed file, display the following field: The size of the size of the compressed file is not compressed by the size compression of the specified directory and compresses all files or decompresses the name -R-RC class-R-generated. -t test, check if the compressed file is complete. -v's file name and compression ratio for each compression and decompression file. -num Adjusts the compressed speed, -1 or -fast represents the fastest compression method (low compression ratio), - 9 or - BEST represents the slowest compression method (high compression ratio). The system default is 6. UNZIP Command How does the compressed software under MS Windows Winzip How to expand under Linux? You can use the unzip command, which is used to desleviate the compressed file named .zip. Syntax: UNZIP [Option] Compressed file name. The meaning of each option is: -x file list decompress file, but does not include the specified File file. -v View the compressed file directory, but does not decompress. -t test file is damaged, but does not decompress. -d directory solves the compressed file to the specified directory. -z only shows the annotation of the compressed file. -n does not override existing files. -o covers existing files and does not require user confirmation. -j does not rebuild the directory structure of the document, unfolding all files to the same directory. Running the DOS Command in the Linux Environment provides a set of portable tools called Mtools to make users easily read, write files and directories from the standard DOS floppy disk. They are very useful to exchange files between DOS and Linux environments.

They are a powerful means of exchange files between systems that do not have a common file system format. For a floppy of a MSDOS, just put the floppy disk in the floppy drive, you can use the commands provided by mtools to access files on the floppy disk. MTools's main commands are as follows: MCD directory name changes the msdos directory; McOPY source file target file replicates files between MSDoS and UNIX; MDEL file name deletes MSDOS files; MDIR directory name shows msdos directory; MFormat drive letter in low-level formatted floppy disk Create a MSDOS file system; RNLabel drive letter generates a MSDOS volume list; MMD directory name is established; MRD directory name deletes the MSDOS directory; MREN source file target file renames existing MSDOS files; mtype file name shows the contents of the MSDOS file. Tip: These commands are very similar to the corresponding MSDOS commands. Linux change file or directory access to each file and directory in the Linux system have access permissions, use it to determine who can access and operate files and directories. The access rights of the file or directory are divided into read-only, only three kinds of only written and can be implemented. Take a document as an example, read-only authority represents only the contents of its content, but prohibits any changes to do anything. The executable permission indicates that the file is allowed to be executed as a program. When the file is created, the file owner automatically has read, write, and executable permissions to the file to facilitate reading and modification of the file. Users can also set access to any combination of access as needed. There are three different types of users to access files or directories: file owners, group users, other users. Everyone is generally the founder of the file. Owners allow the same group of users to have access to files, and access to other users in the system. In this case, each user in the system can access the file or directory owned by the user. There are three groups of access to each file or directory. Each group is represented by three representations, respectively, write and execute permissions, read, write and execute permissions from the owner's associated group; User read, write, and execute permissions. When the details of the file or directory are displayed with the LS -L command, the leftmost list is the file access. For example: $ ls -l sobsrc. TGZ -RW-R - R - 1 Root Root 483997 JU1 L5 17: 3L Sobsrc. TGZ horizontal line represents empty license. R represents read-only, W is written, and X represents executable. Note that there are 10 locations here. The first character specifies the file type. In the usual sense, a directory is also a file. If the first character is a horizontal line, it is a non-directory file. If D, it is a directory. For example: - rw- r - R - Normal file file main group user Other users are access to file SOBSRC.TGZ, indicating that Sobsrc.tgz is a normal file; Sobsrc.tgz's home owner has read and write permissions; with SOBSRC The .TGZ is the user's user only read the permissions; other users only have read rights. After identifying the access permission of a file, the user can use the chmod command provided by the Linux system to reset different access rights. You can also use the chown command to change the owner of a file or directory. Use the chGRP command to change the user group of a file or directory. These commands are described below. The chmod command chmod command is very important for changing access to files or directories. Users use it to control files or directory access. This command has two usage. One is a text setting method containing letters and operator expressions; the other is a digital setting method containing numbers.

1. Text Settings CHMOD [WHO] [ | - | =] [MODE] File Name? The meaning of each option is: Operation object WHO, but any one of the following or a combination: u means " User (user), the owner of the file or directory. G indicates that "Group) users, that is, all users with the owner of the file owner. O Represents "other (others) users. A Represents "All (all) users. It is the system default value. The operation symbol can be: Add a certain permission. - Cancel a certain permission. = Give a given permissions and cancel all all permissions (if any). Set the permissions represented by MODE available to any combination of the following: r readable. W can be written. X can be executed. X Only the X attribute is added to some users if the user is executable or the target file is a directory. S The owner or group ID of the process is set to the file owner of the file when executed. The user ID bit of the "U S" setting file, "G S" sets the group ID bit. T Save the program's text to the switch. U Have the same authority with the owner of the file. G has the same permissions with users of the owner of the file. O Have the same permissions from other users. File Name: Separate the list of files to change permissions, support wildcard. Multiple permissions can be given in a command line, and there is a comma. For example: CHMOD G R, O R EXAMPLE makes the group and other users read permissions to file EXAMPLE. 2. Digital Settings We must first understand the meaning of the attribute represented by the number: 0 means no permissions, 1 means executable permissions, 2 indicate that can be written, and then add it. Therefore, the format of the digital attribute should be 3 binary numbers from 0 to 7, and the order is (U) (G) (O). For example, if you want to have two permissions of a file of a file, you need to put 4 (readable) 2 (write) = 6 (read / write). The general form of digital setting method is: chmod [mode] file name? Chgrp command function: change the group of files or directories. Syntax: Chgrp [Option] Group filename? This command changes the user group to which the specified file belongs. Where Group can be a user group ID, or a group name of the user group in the / etc / group file. The file name is a list of files that are separated by spaces to support wildcards. If the user is not the owner or super user of the file, the group of the file cannot be changed. Each of this command means that the specified directory and the genus of all subdirectories and files in the specified directory are changed. CHOWN Command Features: Change the owner and genus of a file or directory. This order is also commonly used. For example, the root user copies its own files to the user XU, in order to allow the user XU to access this file, the root user should set this file to XU, otherwise, the user XU cannot access this file. Syntax: Chown [Option] User or Group file Description: Chown changes the owner of the specified file to the specified user or group. The user can be a username or user ID. The group can be a group name or group ID. The file is a list of files that are separated by spaces to support wildcards.

The options of this command are as follows: - R Cancellation changes the owner of the specified directory and all subdirectories and files. - v shows the work made by the chown command. Linux related to the user's command passwd command for system security, each user in the Linux system has its own user password except for its username. Therefore, when using the Useradd command to increase, you also need to use the passwd command to set your password for each newly added user; users can change their passwords with the passwd command. The general format of this command is: Passwd [User Name] where the username is the username that needs to modify the password. Only super users can use the "PasswD User Name" to modify the passwords of other users, and ordinary users can only modify their own passwords with the Passwd command without parameters. The method of this command is as follows: Enter passwd ; in (CURRENT) UNIX Passwd: Enter the current password in New Password: Enter the new password under prompt (see this password on the screen): System prompt to enter again This new password. After entering the correct, this new password is encrypted and put in / etc / shdow file. It is important to select a password that is not easy to decipher. Selecting the password should follow the following rules: The password should have at least six (preferably eight) characters; the password should be case the case, the punctuation, and the numbers are mixed. Super user modifies the password of other users (xxq), # passwd root new unix password: retype new unix password: passwd: all authentication tokens Updated SuccessFully # su Command This command is very important. It allows an ordinary user with a superuser or other user permissions, or makes superusers do something in a normal user. Ordinary users must have passwords for superusers or other users when using this command. To leave the current user's identity, you can play exit. The general form of this command is: SU [option] [?] [User account] Description: If you do not specify the user account, the system preset is a superuser root. The meanings of each option in this command are:? C to end after execution of a command. • The purpose of adding this minus is to make the environment variables and users who want to convert. ? m keeps environment variables unchanged. Password: [Enter Super User's Password] Linux System Management Command WALL Command The function of this command is to send information to all logged in users, and the user can put the information you want to send in a file, then enter: # wall The

The general format of this command is: Write User Account [Terminal Name], for example: $ WRITE GUEST HELLO This time the system enters the message state, the user can enter the information you want to send, the input is completed, want to exit the send state, press the combination button . The MESG command MESG command sets whether other users are allowed to send information to themselves with the Write command. If others are allowed to send information, enter the command: # MESG Y Otherwise, enter: # MESG N For superusers, the default value of the system is n; and the default value of the general user system is Y. If you don't have any parameters after MESG, the current state is Y or n .. The sync command The SYNC command is used when it turns off the Linux system. Users need to note that the system cannot shut down the system with a simple shutdown power, because the Linux is like other UNIX systems, many data is cached in memory, and the memory data and the hard disk data are required to check, guarantee when shutting down the system. Hard disk data is the latest in shutting down the system, only this can ensure that the data will not be lost. The process of generally normal shutdown systems is automatically performed, and it is also required to do this during the system operation, and user intervention is required. The SYNC command is forced to write data in memory back to the hard disk to prevent data loss. Users can use this command when needed. The general format of this command is: sync shutdown command shutdown command securely shut down or restarts the Linux system, which prompts all login users on the system before the system is turned off. This command also allows the user to specify a time parameter, which can be a precise time or a time period from now. The exact time is format is HH: mm, represents hours and minutes; the time period is represented by " " and minutes. After the system executes this command, the data synchronization is automatically performed. The general format of this command is: Shutdown [Option] [Time] [Warning Information] Command The meaning of each option is: - K does not really shut down, but just issue a warning message to all users. - Retart immediately after shutdown. - The h is turned off after shutdown. - f Qu quickly and skips FSCK when restarting. - n Quick shutdown, no init program. - C Cancel a rundown that has been run. It is important to specify that this command can only be used by superuser. The feature of the free command Free command is to view the usage of the current system memory, which displays the remaining and used physical memory and swap memory in the system, and shared memory and the core used buffer. The general format of this command is: The meaning of each option in the free [-b | -k | -m] command is shown below: -b Display in bytes. -k is displayed in k bytes. -m is displayed in megabytes. UPTIME command uPtime command The system has run how long it has been running, it shows the following information: Today, how long it has been running, how much login users are currently in the past 1 minute, 5 minutes and 15 minutes Average load. The general format of this command is: uPtime Linux Disk Management DF Command Function: Check the disk space occupancy of the file system. You can use this command to get how much space occupied by the hard disk, and how much space is left now. Syntax: DF [Option] Description: The DF command can display all file systems to the I node and disk blocks. The meaning of each option is as follows: -a Displays disk usage of all file systems, including 0 blocks of file systems, such as / proc file system. -k is displayed in k bytes.

-i displays I node information instead of disk block. -t Displays the disk space usage of the file system of each specified type. -x lists the disk space usage of a specified type file system (contrary to the T option). -T Displays the file system type. The English of the du command du is originally "Disk USAGE", which means that the usage of displays disk space is displayed. Function: Statistical Directory (or file) The size of the disk space is scheduled. Syntax: DU [Option] [Names ...] Description: This command enters each subdirectory of the specified directory step by step and displays the case where the directory occupies the file system data block (1024 bytes). If NAMES is not given, the current directory is counted. The various options of this command are as follows: -s The total number of data blocks for each NAMES parameter is given. -A Recursively Displays the number of data blocks occupied by each file and the documentation in each file in the specified directory. If neither -s or -A is not specified, only the number of disk blocks in each directory in NAMES and the number of disk blocks therein are displayed. -b lists disk space usage in bytes (the system defaults in k bytes). -k lists disk space usage in units of 1024 bytes. -c finally coupled with a total (system default setting). -l Computing all file size, calculates multiple times for hard link files. -X Skip directory on different file systems does not statistically. DD Command Function: Copy the specified input file to the specified output file and can be formatted during the copy. You can use this command to implement the function of the diskcopy command under DOS. First use the DD command to write the data on the floppy disk into a registration file of the hard disk, and write this registration file to the second floppy disk to complete the function of DiskCopy. It should be noted that the registration file on the hard disk should be deleted with the RM command. The system defaults to use standard input files and standard output files. Syntax: DD [Option] if = Enter a file (or device name). OF = Output file (or device name). IBS = bytes read the bytes bytes at a time, that is, the number of bytes read into the buffer. Skip = Blocks Skip the IBS * Blocks block that reads into the buffer. Obs = bytes writes the BYTES byte once, ie the number of bytes written to the buffer. BS = BYtes simultaneously sets the number of bytes of read / write buffers (equal to setting IBS and OBS). CBS = Byte converts the BYTES byte. Count = Blocks only copies the input Blocks block. Conv = ASCII converts the EBCDIC code to the ASCIL code. Conv = EBCDIC converts the ASCIL code to an EBCDIC code. CONV = IBM converts the ASCIL code to the Alternate EBCDIC code. Conv = Block converts the change bit into a fixed character. CONV = Ublock converts the fixed bit into a changing bit. Conv = ucase converts the letters from lowercase to uppercase. CONV = LCase converts the letters by uppercase to lowercase. CONV = NOTRUNC is not cut off output file. CONV = Swab exchanges each pair of input bytes. CONV = NoError does not stop processing at an error. CONV = SYNC Tunes the size of each input record to the size of the IBS (filled with NUL). The fdformat command floppy disk is one of the commonly used storage media. The floppy disk must be formatted before use, and then store data with TAR, DD, CPIO, etc., or the installed file system can be established on the floppy disk.

Function: Low-level formatting floppy syntax: format [-n] device Description: This command is formatted to floppy disk. The -n floppy disk is not inspected after formatting. Device Specifies the device to be formatted, usually one of the following devices: / dev / fd0d360 / dev / fd0h1200 / dev / fd0d360 / dev / fd0h360 / dev / fd0d720 / dev / fd0h720 / dev / fd0h360 / dev / fd0h720 / DEV / FD0H1440Linux Other Commands Echo Command Echo Command The function of displaying a piece of text is displayed on the display, which generally play a prompt. The general format of this command is: echo [-n] string which option n means that the output text is not changed; the string can be quoted, or the quotation marks may not be quoted. When using the echo command to output the string of the quotation number, the string is output; when the echo command outputs the string of the non-quotation number, the various words in the string are output as a string, and each string is divided by a space. . The function of the CAL command CAL command is to display the calendar of a certain month. The general format of this command is: CAL [Option] [Month [Year]] command The meaning of each option is: - j Shows every day in the scheduled month is the first few days in the year (from January 1 Mandarin). - Y shows the calendar of the whole year. The function of the date command Date command is to display and set the system date and time.

转载请注明原文地址:https://www.9cbs.com/read-85817.html

New Post(0)