Description: Shell explanation command, calling program

Source: Internet
Author: User
Tags chmod create directory mkdir parent directory file permissions
First, Introduction
1.
Cal Calendar
LS Viewing files and directories
WHOAMI Viewing Current user information
Users or who or W view the current online user
Logout Sign Out
Shutdown or Powoff shut down the system
Init 6 or Reroot reboot system
passwd Change Password
Ii. Document Management
1. File System: Tree structure (Directory/file)
2. File type: Normal, directory and device file (character C and block B)
3, ls ch*.doc display chxxx.doc file or directory, where xxx is 0 or more arbitrary characters;. is a character.
4. Hidden files: "." begins with a file, such as. PROFILE,.KSHRC,.CSHRC, (init script). rhosts (config file)
View hidden files: ls-a
5. Create File: VI filename
[I] Input
Exit with ESC or SHIFT+ZZ
6. Cat FileName View File contents
Cat-b FileName Display line number
7. WC statistics Number of rows, words, characters
8. CP file1 file2 Copy files 1 to 2
9, MV file1 file2 change path and file name
10. RM FileName Delete File
11. Linux runtime creates three file streams: 0,1,2 (Input/output/error message)
Third, Directory
1, CD ~ Enter the main directory
CD ~usersname into other user home directories
CD-Back to previous directory
2. Absolute path: Have/
Relative path: none/
PWD Gets the current directory
3, mkdir dirname Create directory
Mkdir/tmp/dir-name creating Dir-name in the/tmp directory
mkdir dirname1 dirname2 can create multiple directories at the same time
Mkdir-p/tmp/test/dir-name Create the desired directory in one layer
4, rmdir dirname Delete directory (need directory is empty)
5, cd dirname switch directory
6, MV dirname1 dirname2 Rename directory, 2 Generation 1
7, ".": Current directory;

【.. ": Parent directory.

Iv. file permissions and Access modes
1, chmod Modify Permissions rwx--421
chmod 755 Testfile
2, chown Modify the file owner
Chgrp Modifying a group
3, suid and Sgid: lowercase s has x permission, capital S does not have X permission;
V. Environment variables

1, echo $TEST display variables, need to use $
2, Shell initialization process: check/etc/profile and. Profile, there is read, otherwise skipped;
3, can be modified by VI. Profile, while/etc/profile generally does not have permissions.
4, set the terminal type: VT100, ANSI, xterm
term=vt100 Virtual Terminal
5, Path=/bin:/usr/bin multiple paths with ":" Separated

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.