day 3 regular tasks

which command the absolute path to find the command
Timeshare weeks sun and the moon
Regular tasks:
View crontab -l cron job  
crontab -e to edit the file regular tasks
Timeshare weeks sun and the moon
* * * * * Executed once per minute
1016 * * * Task
10 16 2 10 *
Absolute path to the command
0 1 * * 1-5/usr/bin/rm -rf /tmp/*
Monday to Friday 1:00 every day to perform everything under the tmp directory delete
vim / vi text editor
Three modes:
Command Mode --------> a / i / o edit / input mode -------> esc command mode ---> Press: Bottom Line Command Mode
The following commands are operating in command mode
Copy the three lines yy Copy 3yy
p Paste
dd Delete Delete four lines 4dd
0 to the beginning of the Bank
Bank of ending $ move
H to the beginning of the screen
L moved to the end of the screen
Gg moves to the beginning of the file
Move the cursor to the end of the document G line
Seek
/ Hello full match from top to bottom ? Hello from bottom to top
% Matching brackets
: The bottom line command mode
: ! W (Write) Q (quit) forced wq q wq!
: Set nu show line numbers of the text
: Set nonu cancel the line number
Look environment variable command
echo $PATH
Contents are: split
cp
cp source file destination
Copy directory
cp -r directory name
CP -vr BB / Home Mobile Directory and display procedure
Copy files
cp source file path
cp -v aa.txt / home display procedure
All the properties cp -a document retention, equivalent parameters -dpR link
cp -f mandatory coverage, (when files and source files with the same name is present in the path) without prompting
sed operation of the text
d sed "2d" c1908.txt delete the specified number of lines sed "1,2d" c1908.txt
a sed "1a hello" c1908.txt 指定行的后面附加一行
i sed "1i hello" c1908.txt 指定行的前面附加一行
c sed "2c hello c1908" c1908.txt 替换指定行数
s sed "s/aa/c1908/" c1908.txt 替换指定的字符内容
把上面的命令加参数 -i 修改的内容会作用到文件内部
不加的话,只是显示在打印的屏幕上

Guess you like

Origin www.cnblogs.com/Darry-Ring/p/12143101.html