Linux Study Notes (sorting records)

Source: Internet
Author: User

Linux Study Notes (sorting records)
1. install 2. laruence's Linux Command Learning (1): displays the language currently supported by the system: echo $ LANG (2): modifies the language to English: LANG = EN_US (3 ): command for displaying date and Time: date + % y-% m-% d (4): Command for displaying calendar: cal 2015 (5): easy to use computer: bc exit command quit 3. command learning in Linux learning, if we want to use linux commands, we need to switch to the administrator user. Below is a simple arrangement of commonly used commands in Linux (1 ): su-if the current user is a common user, enter su-to switch to the administrator user (root). If you want to switch to another user, enter the su-user name, for example, su-hanyinglong (2 ): shutdown-h now shutdown now command (3): shutdown-r now = reboot restart now (4): log out from the current user (if it is a graphical terminal, enter Exit command to exit the current user) (5): Switch the cd directory (for example, cd/indicates to switch to the linux root directory (/indicates the root directory) (6 ): pwd displays the command in which path the user is currently running (if you do not know the current folder in the command line, enter the command pwd) (7): useradd username, add a user (8): passwd user name, change the password for the specified user name (9): userdel user name, delete a user, however, the user's subfolders in the home folder will be retained (10): userdel-r username, delete a user, and delete the subfolders together with the user in the home folder. (11): ls for example: ls/home lists all the files and directories under Home (12): ls-l for example: a long list of files and directories listed by ls-l/home is displayed (13): ls-a For example: ls-a/home lists hidden files and directories (14 ): mkdir For example: mkdir han create directory (15): rmdir For example: rmdir han can only delete empty directories. If there are other files in this directory, the command is invalid (16): touch for example: touch han. java creates an empty file (17): cp such as cp/home/ken. java/set the ken in the home path. copy the java file to cp-r dir1 dir2 in the root directory (-r indicates recursion. copy the files in the folder represented by dir1 to the dir2 path), for example, cp-r/home/ken. java/(replace the ken. copy the java file to the root directory) (18): mv such as mv/home/ken. Java/move the ken. java file in home to the root directory. Mv, for example,/ken. java/Kencery. java. change the java file name to Kencery. java rm such as rm/Kencery. java uses the Kencery in the root directory. java Delete (if the file is a folder, it cannot be deleted ). Rm-rf * ([-r indicates recursion, f indicates force DELETION], delete all contents, including directories and folders) such as rm-rf/home/ken. java (Force Delete the ken under home. java folder ).

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.