Linux beginner command collection

Source: Internet
Author: User
Linux beginners will encounter some new problems every time they use Linux, especially for beginners like ours. Therefore, we plan to record the useful commands learned every time we use the Linux process for emergency purposes. 1. View disk information and use capacity df-hT2, view fi...
Linux beginners will encounter some new problems every time they use Linux, especially for beginners like ours. Therefore, we plan to record the useful commands learned every time we use the Linux process for emergency purposes. 1. View disk information and usage capacity df-hT 2. view the space occupied by files in the file folder. du file-hc -- max-depth = 1 -- max-depth = 1 indicates that only files are displayed. level 1 file and folder information in the current directory, if this parameter is not specified, the current folder and all files in the subfolders www.2cto.com are displayed. 3. run the ls command to view the file information. ls-[option] option = a. View hidden files. option = l. Show Details. option = h in KB, MB mode to display the file size options can be used in combination. 4. move files in batches (find + [-exec]/[-OK] + cmd). For example, there are more than 100 files in the f1 folder. c file, to move to the f2 folder, the command is as follows. Note that there is a space before. /f1-name "*. c "-exec mv {}. /f2 \; for the sake of security, you can replace-exec with-OK, then each operation will prompt, especially in batch delete. Find. /f1-name "*. c "-OK rm {}\; 5. mount command (1) mount the disc to the/mnt/cdrom directory mount/dev/cdrom/mnt/cdrom (2) mount-t NFS 192.168.1.1:/mounted dir/mnt (3) mount the ISO file mount-o loop. /file. ISO/mnt/MyIso www.2cto.com 6. view the operating system type uname-a or uname-r 7. display the system process and kill the process (1) display the current user process ps (2) show all processes ps ef (3) kill-9 m (4) kill the process named n-9 n 8. calculate the program running time, in consideration of program efficiency, it is useful to use time program 9 and commands related to the operating system logon account (1) Create account useradd name (2) delete account userdel name delete only user do not delete user directory www.2cto.com userdel-r name delete user and Directory 10. unzip the files unzip tar-xjvf file.tar.bz2/home/document (22.16.tar.gz unzip tar-xzvf file.tar.gz /home/document

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.