using Linux/unix next. Often use the text interface to set up the system or the operating system, the author is in command of this aspect of the process of continuous contact. Therefore, in order toThis special brewing, preparation, began the writing of this article. This paper mainly records some of their usual linux/unix under the operation of commands, records and collation. One can deepen the printinglike. Two can record share. I hope you crossing, for inappropriate or ambiguous places. Give indication and clarification so as to learn and improve together.
"reproduced in use. Please specify the source:http://blog.csdn.net/mahoking"
014Linux chmod Command
1 command format
chmod [Options] [Files] format chmod [option] [file]
2 command functions
The Userdel command sets the directory (file) read, write, and run permissions.
3 Frequently used examples
Command description
Syntax structure:
CHMOD ABC File
The a,b,c represents a number that represents the permissions of user, group, and other respectively.
R=4. w=2, X=1
To 4+2+1=7 the RMX attribute;
To rm-the property, 4+2=6.
To r-x the property, 4+1=5.
Example 01
Command: chmod 777 TestFile.txt
Input: [[email protected] root]# chmod 777 TestFile.txt
Description
Change the testFile.txt read and write operation permissions, all users of this machine can do all of this file.
015Linux chown Command
1 command format
chown [Options] [All people] format chown[option] [user]
2 command functions
Change all the files and groups by Chown. You can use the username and user ID settings when you change all or a group of files. Ordinary users cannot change their files to other owners. Its operation permissions are generally administrators.
3 Frequently used examples
Example 01
Command: chown mail:mail testLog2014.log
Input: [[email protected] root]# chown mail:mail testLog2014.log
Description
Change all the people and groups in the file. This example assigns the TestLog2014.log file to a mail user. Mail Group. Assuming that the command is Chown:mail testLog2014.log, the TestLog2014.log file is assigned to the Mail group, and the whole is unchanged.
Example 02
Command: chown–r–v root:mail TestDir
Input:
[Email protected] root]# chown–r–v root:mail TestDir
All "Testdir/log2014.log" has been changed to Root:mail
All "Testdir/linklog.log" has been changed to Root:mail
All "Testdir/log2015.log" has been changed to Root:mail
All "Testdir/log2013.log" has been changed to Root:mail
All of the "Testdir/log2012.log" have been reserved for Root:mail
All "Testdir/log2017.log" has been changed to Root:mail
All "Testdir/log2016.log" has been changed to Root:mail
All "TestDir" has been changed to Root:mail
Description
Changes the owner and group of all files under the specified folder and its subfolders.
-R processes all files under the specified folder and its subfolders.
-V Displays the specific processing information.
016Linux Tail Command
1 command format
tail [options] [Files] format tail [option] [file]
2 command functions
The tail command starts from the specified point and writes the file to standard output. The-f option of the tail command makes it easy to access the log files that are being changed. TAIL-F filename will display the most up-to-date contents of filename on the screen, and constantly refresh so that you can see the latest file content.
3 Frequently used examples
Example 01
Command: tail–f FileName
Input: [[email protected] root]# tail–f fileName
Description
-F assumes that the input file is a regular file or assumes that the file parameter specifies a FIFO (first-in, in/out), then the tail command will not terminate after the last specified unit of the input file has been copied. Instead, continue to read and copy additional units from the input file (when those cells are available).
Assume that a file parameter is not specified. And the standard input is a pipe, the-f flag is ignored.
The tail-f command can be used to monitor the growth of a file that is also being written by a process.
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Iv. Linux/unix operation Command Accumulate "chmod, chown, tail"