search
HomeOperation and MaintenanceLinux Operation and MaintenanceI haven't collected these 50 commands in Linux yet!

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
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
Linux's Essential Components: Explained for BeginnersLinux's Essential Components: Explained for BeginnersApr 17, 2025 am 12:08 AM

The core components of Linux include the kernel, file system, shell and common tools. 1. The kernel manages hardware resources and provides basic services. 2. The file system organizes and stores data. 3. Shell is the interface for users to interact with the system. 4. Common tools help complete daily tasks.

Linux: A Look at Its Fundamental StructureLinux: A Look at Its Fundamental StructureApr 16, 2025 am 12:01 AM

The basic structure of Linux includes the kernel, file system, and shell. 1) Kernel management hardware resources and use uname-r to view the version. 2) The EXT4 file system supports large files and logs and is created using mkfs.ext4. 3) Shell provides command line interaction such as Bash, and lists files using ls-l.

Linux Operations: System Administration and MaintenanceLinux Operations: System Administration and MaintenanceApr 15, 2025 am 12:10 AM

The key steps in Linux system management and maintenance include: 1) Master the basic knowledge, such as file system structure and user management; 2) Carry out system monitoring and resource management, use top, htop and other tools; 3) Use system logs to troubleshoot, use journalctl and other tools; 4) Write automated scripts and task scheduling, use cron tools; 5) implement security management and protection, configure firewalls through iptables; 6) Carry out performance optimization and best practices, adjust kernel parameters and develop good habits.

Understanding Linux's Maintenance Mode: The EssentialsUnderstanding Linux's Maintenance Mode: The EssentialsApr 14, 2025 am 12:04 AM

Linux maintenance mode is entered by adding init=/bin/bash or single parameters at startup. 1. Enter maintenance mode: Edit the GRUB menu and add startup parameters. 2. Remount the file system to read and write mode: mount-oremount,rw/. 3. Repair the file system: Use the fsck command, such as fsck/dev/sda1. 4. Back up the data and operate with caution to avoid data loss.

How Debian improves Hadoop data processing speedHow Debian improves Hadoop data processing speedApr 13, 2025 am 11:54 AM

This article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file

How to learn Debian syslogHow to learn Debian syslogApr 13, 2025 am 11:51 AM

This guide will guide you to learn how to use Syslog in Debian systems. Syslog is a key service in Linux systems for logging system and application log messages. It helps administrators monitor and analyze system activity to quickly identify and resolve problems. 1. Basic knowledge of Syslog The core functions of Syslog include: centrally collecting and managing log messages; supporting multiple log output formats and target locations (such as files or networks); providing real-time log viewing and filtering functions. 2. Install and configure Syslog (using Rsyslog) The Debian system uses Rsyslog by default. You can install it with the following command: sudoaptupdatesud

How to choose Hadoop version in DebianHow to choose Hadoop version in DebianApr 13, 2025 am 11:48 AM

When choosing a Hadoop version suitable for Debian system, the following key factors need to be considered: 1. Stability and long-term support: For users who pursue stability and security, it is recommended to choose a Debian stable version, such as Debian11 (Bullseye). This version has been fully tested and has a support cycle of up to five years, which can ensure the stable operation of the system. 2. Package update speed: If you need to use the latest Hadoop features and features, you can consider Debian's unstable version (Sid). However, it should be noted that unstable versions may have compatibility issues and stability risks. 3. Community support and resources: Debian has huge community support, which can provide rich documentation and

TigerVNC share file method on DebianTigerVNC share file method on DebianApr 13, 2025 am 11:45 AM

This article describes how to use TigerVNC to share files on Debian systems. You need to install the TigerVNC server first and then configure it. 1. Install the TigerVNC server and open the terminal. Update the software package list: sudoaptupdate to install TigerVNC server: sudoaptinstalltigervnc-standalone-servertigervnc-common 2. Configure TigerVNC server to set VNC server password: vncpasswd Start VNC server: vncserver:1-localhostno

See all articles

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)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools