Linux commands 20180819

Source: Internet
Author: User
Tags disk usage

  1. Mount, Mount USB stick, mount-t Vfat/dev/sdb1/media/disk
  2. Umount, uninstall, umount/home/rich/mnt
  3. DF to see the size of disk space, Df-h can convert size to m,g form
  4. Du, disk space is gone, showing disk usage for a particular directory
    1. DU-C: Total size of all listed files
    2. Du-h: In easy-to-read format
    3. Du-s: Total for each output parameter
  5. Sort order, if required to output according to the number size, then add sort-n file1
  6. grep, Sed,awk
  7. bZIP, TAR, gzip:
    1. gzip file: Compress files to generate. gz files
    2. Gzcat file: Viewing compressed files
    3. Gunzip file.gz: Extracting Files
    4. Tar: Archive data, TAR-CVF Test.tar test/test2/create test.tar files containing test and test2; TAR-TF Test.tar Lists the contents of the tar file; tar-xvf test.tar extracts content from tar.
    5. Encountered many for. Tgz, TAR-ZXVF file.tgz; If you create it, you can use TAR-ZCVF file.tgz file
  8. Alias, alias, easy to use, alias li= "Ls-li" equal sign cannot have spaces on either side
  9. To view Global environment variables: env or PRINTENV
  10. Login shell, the system will be read from the following 5 files:
    1. /etc/profile (System default master boot file)
    2. ~/.bashrc
    3. ~/.bash_profile find BASHRC This file in the home directory, and if so, execute the command in BASHRC.
    4. ~/.bash_login
    5. ~/.profile
  11. ETC/PASSWD file (name; group; uid,etc); Etc/shadow is a file that stores passwords
  12. Useradd Userdel, passwd Qingli (user who modifies an existing password),
  13. chmod u/g/o + r/w/x
  14. Yum install Packagename/yum list installed (already installed package)/Yum list Updates/yum update Packagename/yum remove PackageName (delete Package and keep config file)/Yum erase Pakcagename (remove software and all files)
  15. Source installation, wget,./configure, make, make install

Linux commands 20180819

Related Article

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.