Common Linux commands (File user management)

Source: Internet
Author: User

Common Linux commands (File user management) Linux commands. Different from the doscommand, Linux commands (including file names and so on) are case sensitive. /Sbin system underlying command storage directory/bin common command directory command view help three methods info commandcommand -- helpman command 1. File user management ls-l display file list (Long Data Format) ls a * a starts with all ls? A starts with ls abc [1-6] and ends with a number ranging from 1 to 6 after abc. ls> cmd outputs the folder content ls-ahl to view the cp-r copy of the file group. file-r folder mkdir test create folder rm-rf delete file-r folder mv source directory target directory move file or folder (same Directory rename) touch creates an empty file or modifies the file time. ln-s: Path of the source file to the target file (the linked file is like a shortcut file in windows) cp-rf r indicates recursive directory f indicates that no message is prompted to force umask to change the properties of the preset file or directory. cat file displays the file content starting from the first line. tac file is displayed starting from the last line., we can see that tac is a cat inverted write! More file displays the file content on one page. less file is similar to more, but it is better than more. He can flip the page forward! When head file only looks at the first few lines of tail file and only the tail few lines of nl file are displayed, the line number is output! Od file reads the file content in binary format! Gzip compression zaa.zip file name-r aa.zip directory path represents the compressed directory-m represents the deletion of the source file unzip decompression-x abc exclude other abc files are decompressed rpm-qa | grep package name check whether installation this software rpm-ivh package name Installation Software rpm-e uninstall software make multi-file compilation tar-zvxf filename.tar.gz decompress the compressed file rpm-ql | grep mysql find mysql Installed Package rpm-e package name, force Delete add parameter -- nodepsrpm-qa display all installed rpm packages in the system yum install package name yum install yum remove package name yum Delete yum list all packages installed in the current system file this command can be used to view the type of this file. diff can be used to list the differences between two files. which can view the location of the executable file. w Hereis view the location of the file locate with the database view the location of the file grep-n "keyword" file search file content find-size + export 00c-print # query the file with a length greater than 1 MB find/ home-mmin + 60 # find/home-size + 512 k files modified 60 minutes ago under/home # find/-mmin-5 files larger than k # search the passwd user1 file modified in the last 5 minutes in the system changes the password of a user (only root execution is allowed) usermod-g group name username Change User Group usermod-d directory name username Change User Login initial directory useradd Add add user useradd-g group name userdel delete user-r delete user home directory groupadd groupname group add groupdel grou Pname group Delete chmod permission number username chgrp testgroup test3.txt change file group chgrp-R testgroup testdir/Change directory group chown testuser test.txt change file owner chmod a + x Change File Permission execute chattr changing the special attributes of the file chattr + a file1 only allows reading and writing the file lsattr file in append mode to display the special attributes of the file!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.