In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "Linux file management commands", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what are the file management commands in Linux" this article.
Summary: 50 commands managed by Linux files
1.Linux cat command
The cat command is used to connect files and print to standard output devices.
2.Linux chattr command
The Linux chattr command is used to change file properties.
3.Linux chgrp command
The Linux chgrp command is used to change the group to which a file or directory belongs.
In the UNIX system family, the control of file or directory permissions is managed by the owner and the group to which he belongs. You can use the chgrp instruction to change the group to which files and directories belong, either by group name or group identification code.
4.Linux chmod command
The file call permissions of Linux/Unix are divided into three levels: file owner, group, and others. Chmod can be used to control how files are called by others.
5.Linux chown command
Linux/Unix is a multiuser and multiplex operating system, and all files have owners. Use chown to change the owner of the specified file to the specified user or group, the user can be the user name or the user ID; group can be the group name or the group ID; file is a list of files to change permissions separated by spaces, and wildcards are supported.
Generally speaking, this instruction is only used by the system administrator (root). The average user does not have the permission to change someone else's file owner, nor does he have the permission to change his own file owner to someone else. Only the system administrator (root) has such permissions.
6.Linux cksum command
The Linux cksum command is used to check that the CRC of the file is correct. Ensure that files are not corrupted during transfer from one system to another.
CRC is an error checking method whose standard is specified by CCITT and can detect at least 99.998% of known errors.
After the specified file is verified by the instruction "cksum", the instruction will return the verification result for the user to check whether the file is correct. If no file name is specified or given a file name of "-", the instruction "cksum" reads data from the standard input device.
7.Linux cmp command
The Linux cmp command is used to compare whether there are differences between the two files.
When the two files compared to each other are exactly the same, the directive does not display any information. If a difference is found, the default will indicate the character and column number of the first difference. If no file name is specified or given a file name of "-", the cmp instruction reads the data from the standard input device.
8.Linux diff command
The Linux diff command is used to compare differences in files.
Diff compares the similarities and differences of text files line by line. Is specified to compare directories, diff compares files with the same filename in the directory, but does not compare their subdirectories.
9.Linux git command
The Linux git command is a file administrator in text mode.
Git is a program used to manage files. It is very similar to Norton Commander under DOS and has an interactive interface. It operates in almost the same way as Norton Commander.
10.Linux find command
The Linux find command is used to find files in the specified directory. Any string that precedes a parameter is treated as the name of the directory you are looking for. If you use this command without setting any parameters, the find command looks for subdirectories and files under the current directory. And all the subdirectories and files found are displayed.
11.Linux file command
The Linux file command is used to identify the file type.
Through the file instruction, we are able to identify the type of the file.
12.Linux diffstat command
The Linux diffstat command displays statistics based on the comparison results of diff.
Diffstat reads the output of diff, and then calculates the differences between inserts, deletions and modifications of each file.
13.Linux ln command
The Linux ln command is a very important command, and its function is to establish a synchronous link for a file in another location.
When we need to use the same file in a different directory, we don't need to put the same file in every directory we need, we just put the file in a fixed directory, and then link it with the ln command (link) in another directory, without repeatedly occupying disk space.
14.Linux cut command
The Linux cut command is used to display the text of each line from num1 to num2 from the beginning.
15.Linux indent command
The Linux indent command is used to adjust the format of the C original code file.
Indent can recognize the original code file of C and format it for programmers to read.
16.Linux gitview command
The Linux gitview command is used to view the contents of the file, which displays words in both hexadecimal and ASCII format.
17.Linux less command
Less is similar to more, but you can browse files at will with less, while more can only move forward, but not backward, and less does not load the entire file before viewing it.
18.Linux locate command
The Linux locate command is used to find documents that meet the criteria, and it goes to the database where the document and directory names are saved to find documents or directories that meet the criteria of the template style.
In general, we only need to type locate your_file_name to find the specified file.
19.Linux lsattr command
The Linux lsattr command is used to display file properties.
Use chattr to change the attributes of a file or directory, and you can execute lsattr instructions to query its attributes.
20.Linux mattrib command
The Linux mattrib command is used to change or display the properties of the MS-DOS file.
Mattrib is a mtools tool instruction, which simulates the attrib instruction of MS-DOS and can change the properties of the MS-DOS file.
21.Linux mc command
The Linux mc command is used to provide a menu-style file manager.
After executing mc, you will see a menu-style file management program, which is divided into four parts.
22.Linux mdel command
The Linux mdel command is used to delete files in MSDOS format.
A prompt is generated before deleting read-only.
23.Linux mdir command
The Linux mdir command displays the MS-DOS directory.
Mdir is a mtools tool instruction that simulates the dir instruction of MS-DOS and displays the contents of the directory in the MS-DOS file system.
24.Linux mktemp command
The Linux mktemp command is used to create a staging file.
A staging file created by mktemp for use by shell script.
25.Linux more command
Linux more command is similar to cat, but will be displayed in the form of page by page, which is more convenient for users to read page by page, and the most basic instruction is to press the blank key (space) to display on the next page, press b key to go back to (back) a page to display, and there is a function to search for strings (similar to vi). For instructions in use, please press h.
26.Linux mmove command
The Linux mmove command is used to move files or directories, or change names, in the MS-DOS file system.
Mmove is a mtools tool command that simulates MS-DOS 's move command to move an existing file or directory or change the name of an existing file or directory in the MS-DOS file system.
27.Linux mread command
The Linux mread command is used to copy the MS-DOS file to the directory of Linux/Unix.
Mread is a mtools tool command that copies MS-DOS files to the file system of Linux. This command is no longer commonly used and is generally replaced by the mcopy command.
28.Linux mren command
The Linux mren command is used to change the name of a MS-DOS file or directory or to move a file or directory.
Mren is a MS-DOS tool instruction, which is similar to the ren instruction under DOS and can be used to change the name of the MS-DOS file or directory.
The source file must be a file that already exists on the disk. If the drive letter and path are ignored, it represents the current disk and the file in the current directory.
The new file name is the name of the file to be replaced. The new file name cannot be preceded by a different drive letter and path from the source file, because this command can only change the file name on the same disk.
29.Linux mtools command
The Linux mtools command is used to display instructions supported by mtools.
Mtools is a utility program for the MS-DOS file system, which can simulate many MS-DOS instructions. These instructions are symbolic links to mtools, so they have some common features.
30.Linux mtoolstest command
The Linux mtoolstest command is used to test and display settings related to mtools.
Mtoolstest is a mtools tool instruction that reads and analyzes the configuration file of mtools and displays the results on the screen.
31.Linux mv command
The Linux mv command is used to rename or move a file or directory to another location.
32.Linux od command
The Linux od command is used to output the contents of the file.
The od instruction reads the contents of the given file and presents its contents in octal code.
33.Linux paste command
The Linux paste command is used to merge the columns of files.
The paste directive merges each file column by column.
34.Linux patch command
The Linux patch command is used to patch files.
The patch directive allows the user to modify and update the original file by setting the patch file. If only one file is modified at a time, instructions can be issued directly in the instruction column to be executed in sequence. If you cooperate with the way of patching files, you can repair a large number of files at one time, which is also one of the core upgrade methods of the Linux system.
35.Linux rcp command
The Linux rcp command is used to copy remote files or directories.
The rcp instruction is used to copy files or directories remotely, just as if you specify more than two files or directories, and the final destination is an existing directory, it will copy all the files or directories specified earlier to that directory.
36.Linux rm command
The Linux rm command is used to delete a file or directory.
37.Linux slocate command
The Linux slocate command looks for a file or directory.
Slocate itself has a database that stores information about files and directories in the system.
38.Linux split command
The Linux split command is used to split a file into several.
This directive splits large files into smaller files, which by default will be cut into small files for every 1000 lines.
39.Linux tee command
The Linux tee command is used to read standard input data and output its contents to a file.
The tee instruction reads the data from the standard input device, outputs its contents to the standard output device, and saves it to a file.
40.Linux tmpwatch command
The Linux tmpwatch command is used to delete staging files.
Execute the tmpwatch directive to delete unnecessary staging files, and you can set the file expiration time in hours.
41.Linux touch command
The Linux touch command is used to modify the time properties of a file or directory, including access time and change time. If the file does not exist, the system creates a new file.
Ls-l can display the time record of the archive.
42.Linux umask command
The Linux umask command specifies the default permission mask when the file is created.
Umask can be used to set the permission mask. The permission mask consists of three octal digits. After the existing access permissions are subtracted from the permission mask, the default permissions when the file is created can be generated.
43.Linux which command
The Linux which command is used to find files.
The which command looks for files that match the criteria in the directory set by the environment variable $PATH.
44.Linux cp command
The Linux cp command is mainly used to copy files or directories.
45.Linux whereis command
The Linux whereis command is used to find files.
This directive looks for files that meet the criteria in a specific directory. These files should belong to the original code, binaries, or help files.
This directive can only be used to find binaries, source code files, and man man pages, and the general file location needs to use the locate command.
46.Linux mcopy command
The Linux mcopy command is used to copy MSDOS format files to Linux, or from Linux to copy MSDOS files to disk.
Mcopy can copy a single file to a specified file name, or several files to a specified directory. The source and destination files can be MSDOS or Linux files.
The mcopy instruction is a mtools tool instruction that can copy files on a DOS system or between DOS and Linux operating systems.
47.Linux mshowfat command
The Linux mshowfat command is used to display the records of the MS-DOS file in FAT.
Mshowfat is a mtools tool instruction that displays the record number of the MS-DOS file in FAT.
48.Linux rhmask command
The Linux rhmask command is used to encrypt and decrypt files.
The encrypted file can be made by executing the rhmask instruction, which is convenient for the user to transmit the file on the open network without being arbitrarily embezzled.
49.Linux scp command
The Linux scp command is used to copy files and directories between Linux.
Scp is the abbreviation of secure copy, and scp is a secure remote file copy command based on ssh login in linux system.
50.Linux awk command
AWK is a language that processes text files and is a powerful text analysis tool.
AWK is called because it takes the first characters of the three founders Alfred Aho,Peter Weinberger and Brian Kernighan's Family Name.
These are all the contents of this article entitled "what are the commands for File Management in Linux?" Thank you for 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.