Home Operation and Maintenance Linux Operation and Maintenance I haven't collected these 50 commands in Linux yet!

I haven't collected these 50 commands in Linux yet!

Oct 14, 2021 pm 04:30 PM
cloud computing

The following column linux system tutorial will introduce you to 50 commands for Linux file management. I hope it will be helpful to friends in need!

1.Linux cat command

The cat command is used to connect files and print to on the standard output device.

2.Linux chattr command

The Linux chattr command is used to change file attributes.

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 it belongs. You can use the chgrp command to change the group to which files and directories belong. The setting method can be the group name or group identifier.

4.Linux chmod command

Linux/Unix file calling permissions are divided into three levels: file owner, group, and other. Use chmod to control how files are called by others.

5.Linux chown command

Linux/Unix is ​​a multi-person, multi-tasking 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 user ID; the group can be the group name or group ID; the file is a space-separated list of files whose permissions need to be changed, and wildcards are supported.

Generally speaking, this command can only be used by the system administrator (root). Generally, users do not have the permission to change the file owner of others, nor do they have the permission to change the owner of their own file to someone else. . Only the system administrator (root) has such permissions.

6.Linux cksum command

The Linux cksum command is used to check whether the CRC of the file is correct. Ensure that files are not corrupted during transfer from one system to another.

CRC is a debugging check method. The standard of this check method is specified by CCITT and can detect at least 99.998% of known errors.

After the specified file is submitted to the command "cksum" for verification, the command will return the verification result for the user to check whether the file is correct. If no file name is specified or "-" is given, the "cksum" command reads data from the standard input device.

7.Linux cmp command

The Linux cmp command is used to compare two files for differences.

When the two files compared to each other are exactly the same, this command will not display any information. If differences are found, the character and column number of the first difference will be marked by default. If no file name is specified or "-" is given, the cmp command reads data from the standard input device.

8.Linux diff command

The Linux diff command is used to compare the differences between files.

diff compares the similarities and differences of text files line by line. Therefore, if directories are specified to be compared, diff will compare files with the same file name in the directory, but will not compare subdirectories.

9.Linux git command

The Linux git command is a file manager in text mode.

Git is a program used to manage files. It is very similar to Norton Commander under DOS and has an interactive operation interface. Its operation method is almost the same as Norton Commander.

10.Linux find command

The Linux find command is used to find files in the specified directory. Any string preceding the parameter will be treated as the name of the directory to be searched. If you use this command without setting any parameters, the find command will search for subdirectories and files in the current directory. And all found subdirectories and files will be displayed.

11.Linux file command

The Linux file command is used to identify file types.

Through the file command, we can identify the type of the file.

12.Linux diffstat command

The Linux diffstat command displays statistics based on the diff comparison results.

diffstat reads the output results of diff, and then counts the insertion, deletion, modification and other difference measurement of each file.

13.Linux ln command

The Linux ln command is a very important command. Its function is to establish a synchronous link for a certain file in another location.

When we need to use the same file in different directories, we don’t need to put a file that must be the same in every required directory. We only need to put it in a fixed directory. This file can then be linked using the ln command in other directories without repeatedly occupying disk space.

14.Linux cut command

The Linux cut command is used to display the text from num1 to num2 from the beginning of each line.

15.Linux indent command

The Linux indent command is used to adjust the format of C original code files.

indent can identify C original code files and format them to make them easier for programmers to read.

16.Linux gitview command

The Linux gitview command is used to view the contents of the file. It will display character codes in both hexadecimal and ASCII formats.

17.Linux less command

less is similar to more, but you can use less to browse files at will, while more can only move forward, but not backward, and less is in The entire file is not loaded before viewing.

18.Linux locate command

The Linux locate command is used to find documents that meet the conditions. It will go to the database where the document and directory names are saved to find the template pattern. The document or directory of the condition.

Generally, we only need to enter locate your_file_name to find the specified file.

19.Linux lsattr command

The Linux lsattr command is used to display file attributes.

Use chattr to change the attributes of a file or directory. You can execute the lsattr command to query its attributes.

20.Linux mattrib command

The Linux mattrib command is used to change or display the attributes of MS-DOS files.

mattrib is the mtools tool command, which simulates the attrib command of MS-DOS and can change the attributes of MS-DOS files.

21.Linux mc command

The Linux mc command is used to provide a menu-based file management program.

After executing mc, you will see a menu-style file management program, divided into 4 parts.

22.Linux mdel command

The Linux mdel command is used to delete MSDOS format files.

There will be a prompt message before deleting read-only.

23.Linux mdir command

The Linux mdir command is used to display the MS-DOS directory.

mdir is the mtools tool command, which simulates the MS-DOS dir command and can display the directory contents in the MS-DOS file system.

24.Linux mktemp command

The Linux mktemp command is used to create temporary files.

A temporary file created by mktemp for use by shell scripts.

25.Linux more command

Linux more command is similar to cat, but it will be displayed page by page, which is more convenient for users to read page by page. The basic command is to press the space key to display the next page, and press the b key to display the next page. It also has a search string function (similar to vi). In-use documentation , 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 the mtools tool command, which simulates the MS-DOS move command. It can move existing files or directories in the MS-DOS file system, or change the name of existing files or directories.

27.Linux mread command

The Linux mread command is used to copy MS-DOS files to a Linux/Unix directory.

mread is the mtools tool command, which can copy MS-DOS files to the Linux file system. This command is no longer commonly used, and the mcopy command is generally used instead.

28.Linux mren command

The Linux mren command is used to change the name of an MS-DOS file or directory, or to move a file or directory.

mren is an MS-DOS tool command, which is similar to the ren command under DOS and can change the name of an 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 means the file on the current disk and current directory.

The new file name is the name of the file to be replaced. You cannot add a drive letter and path different from the source file before the new file name, because this command can only change the file name on the same drive.

29.Linux mtools command

The Linux mtools command is used to display the instructions supported by mtools.

mtools is a tool program for the MS-DOS file system, which can simulate many MS-DOS instructions. These instructions are all symbolic links of mtools, so they will have some common features.

30.Linux mtoolstest command

The Linux mtoolstest command is used to test and display mtools related settings.

mtoolstest is the mtools tool command, which can read and analyze the mtools configuration file and display the results on the screen.

31.Linux mv command

The Linux mv command is used to rename files or directories, or move files or directories to other locations.

32.Linux od command

The Linux od command is used to output file contents.

The od command will read the contents of the given file and render its contents in octal characters.

33.Linux paste command

The Linux paste command is used to merge columns of files.

Thepaste command will merge each file column by column.

34.Linux patch command

The Linux patch command is used to patch files.

Thepatch command allows users to modify and update the original file by setting a patch file. If you only modify one file at a time, you can directly issue commands in the command line and execute them sequentially. If you cooperate with the method of patching files, you can patch a large number of files at one time. This is also one of the core upgrade methods of Linux systems.

35.Linux rcp command

The Linux rcp command is used to copy remote files or directories.

The rcp command is used to copy files or directories remotely. If more than two files or directories are specified at the same time, and the final destination is an existing directory, it will copy all previously specified files or directories. Directory is copied into this directory.

36.Linux rm command

Linux rm command is used to delete a file or directory.

37.Linux slocate command

The Linux slocate command finds files or directories.

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 command splits a large file into smaller files. By default, it will be cut into a small file every 1000 lines.

39.Linux tee command

The Linux tee command is used to read the standard input data and output its contents into a file.

The tee command reads data from the standard input device, outputs its content to the standard output device, and saves it as a file.

40.Linux tmpwatch command

The Linux tmpwatch command is used to delete temporary files.

Execute the tmpwatch command to delete unnecessary temporary files. You can set the file expiration time in hours.

41.Linux touch command

The Linux touch command is used to modify the time attributes of a file or directory, including access time and change time. If the file does not exist, the system will create a new file.

ls -l can display the time record of the file.

42.Linux umask command

The Linux umask command specifies the default permission mask when creating a file.

umask can be used to set [permission mask]. [Permission mask] is composed of three octal numbers. After subtracting the permission mask from the existing access permissions, the default permissions when creating the file can be generated.

43.Linux which command

Linux which command is used to find files.

which command will search for files that meet the conditions 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 command will search for files that meet the conditions in a specific directory. These files should be raw code, binary files, or help files.

This command can only be used to find binary files, source code files and man pages. Generally, you need to use the locate command to locate files.

46.Linux mcopy command

The Linux mcopy command is used to copy MSDOS format files to Linux, or to copy MSDOS files from Linux to a disk.

mcopy can copy a single file to the specified file name, or copy several files to the specified directory. The source and destination files can be MSDOS or Linux files.

The mcopy command is an mtools tool command that can copy files in a DOS system or copy files between DOS and Linux operating systems.

47.Linux mshowfat command

The Linux mshowfat command is used to display the records of MS-DOS files in FAT.

mshowfat is the mtools tool command, which can display the record number of MS-DOS files in FAT.

48.Linux rhmask command

The Linux rhmask command is used to encrypt and decrypt files.

Execute the rhmask command to create an encrypted file, which is convenient for users to transmit the file on the public network without being arbitrarily stolen.

49.Linux scp command

The Linux scp command is used to copy files and directories between Linux.

scp is the abbreviation of secure copy. scp is a secure remote file copy command based on ssh login under Linux system.

50.Linux awk command

AWK is a language for processing text files and a powerful text analysis tool.

The reason why it is called AWK is because it takes the first characters of the family names of its three founders, Alfred Aho, Peter Weinberger, and Brian Kernighan.

The above is the detailed content of I haven't collected these 50 commands in Linux yet!. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Cloud computing giant launches legal battle: Amazon sues Nokia for patent infringement Cloud computing giant launches legal battle: Amazon sues Nokia for patent infringement Jul 31, 2024 pm 12:47 PM

According to news from this site on July 31, technology giant Amazon sued Finnish telecommunications company Nokia in the federal court of Delaware on Tuesday, accusing it of infringing on more than a dozen Amazon patents related to cloud computing technology. 1. Amazon stated in the lawsuit that Nokia abused Amazon Cloud Computing Service (AWS) related technologies, including cloud computing infrastructure, security and performance technologies, to enhance its own cloud service products. Amazon launched AWS in 2006 and its groundbreaking cloud computing technology had been developed since the early 2000s, the complaint said. "Amazon is a pioneer in cloud computing, and now Nokia is using Amazon's patented cloud computing innovations without permission," the complaint reads. Amazon asks court for injunction to block

C++ Cloud Computing Best Practices: Deployment, Management, and Scalability Considerations C++ Cloud Computing Best Practices: Deployment, Management, and Scalability Considerations Jun 01, 2024 pm 05:51 PM

To achieve effective deployment of C++ cloud applications, best practices include: containerized deployment, using containers such as Docker. Use CI/CD to automate the release process. Use version control to manage code changes. Implement logging and monitoring to track application health. Use automatic scaling to optimize resource utilization. Manage application infrastructure with cloud management services. Use horizontal scaling and vertical scaling to adjust application capacity based on demand.

As demand grows in the artificial intelligence era, AWS, Microsoft, and Google continue to invest in cloud computing As demand grows in the artificial intelligence era, AWS, Microsoft, and Google continue to invest in cloud computing May 06, 2024 pm 04:22 PM

The growth of the three cloud computing giants shows no sign of slowing down until 2024, with Amazon, Microsoft, and Google all generating more revenue in cloud computing than ever before. All three cloud vendors have recently reported earnings, continuing their multi-year strategy of consistent revenue growth. On April 25, both Google and Microsoft announced their results. In the first quarter of Alphabet’s fiscal year 2024, Google Cloud’s revenue was US$9.57 billion, a year-on-year increase of 28%. Microsoft's cloud revenue was $35.1 billion, a year-over-year increase of 23%. On April 30, Amazon Web Services (AWS) reported revenue of US$25 billion, a year-on-year increase of 17%, ranking among the three giants. Cloud computing providers have a lot to be happy about, with the growth rates of the three market leaders over the past

Application alternatives of Golang technology in the field of cloud computing Application alternatives of Golang technology in the field of cloud computing May 09, 2024 pm 03:36 PM

Golang cloud computing alternatives include: Node.js (lightweight, event-driven), Python (ease of use, data science capabilities), Java (stable, high performance), and Rust (safety, concurrency). Choosing the most appropriate alternative depends on application requirements, ecosystem, team skills, and scalability.

Integration of PHP REST API and cloud computing platform Integration of PHP REST API and cloud computing platform Jun 04, 2024 pm 03:52 PM

The advantages of integrating PHPRESTAPI with the cloud computing platform: scalability, reliability, and elasticity. Steps: 1. Create a GCP project and service account. 2. Install the GoogleAPIPHP library. 3. Initialize the GCP client library. 4. Develop REST API endpoints. Best practices: use caching, handle errors, limit request rates, use HTTPS. Practical case: Upload files to Google Cloud Storage using Cloud Storage client library.

Java Cloud Computing: Cloud Migration Strategies and Steps Java Cloud Computing: Cloud Migration Strategies and Steps Jun 05, 2024 pm 03:54 PM

Java cloud migration involves migrating applications and data to cloud platforms to gain benefits such as scaling, elasticity, and cost optimization. Best practices include: Thoroughly assess migration eligibility and potential challenges. Migrate in stages to reduce risk. Adopt cloud-first principles and build cloud-native applications wherever possible. Use containerization to simplify migration and improve portability. Simplify the migration process with automation. Cloud migration steps cover planning and assessment, preparing the target environment, migrating applications, migrating data, testing and validation, and optimization and monitoring. By following these practices, Java developers can successfully migrate to the cloud and reap the benefits of cloud computing, mitigating risks and ensuring successful migrations through automated and staged migrations.

Does the application of Golang technology in the field of cloud computing require high costs? Does the application of Golang technology in the field of cloud computing require high costs? May 09, 2024 pm 02:00 PM

Golang is economically viable in cloud computing because it compiles directly to native code, is lightweight at runtime, and has excellent concurrency. These factors can lower costs by reducing cloud computing resource requirements, improving performance, and simplifying management.

Java Cloud Computing: A Guide to High Availability and Fault Tolerance Strategies Java Cloud Computing: A Guide to High Availability and Fault Tolerance Strategies Jun 01, 2024 pm 01:00 PM

This article provides guidance on high availability and fault tolerance strategies for Java cloud computing applications, including the following strategies: High availability strategy: Load balancing Auto-scaling Redundant deployment Multi-region persistence Failover Fault tolerance strategy: Retry mechanism Circuit interruption Idempotent operation timeout and callback Bounce error handling practical cases demonstrate the application of these strategies in different scenarios, such as load balancing and auto-scaling to cope with peak traffic, redundant deployment and failover to improve reliability, and retry mechanisms and idempotent operations to prevent data loss. .

See all articles