Linux find a method that matches multiple keywords in GREP at a time by finding multiple specified files or excluding certain types of files(1) Linux find more than one specified file at a time:Find a.html and b.html
Find. -name "a.html"-name "b.html"
Find. -regex '. *\.txt\|. *\.doc\|. *\.mp3 '
Find. -regex '. *\.txt\|. *\.doc\|. *\.mp3 '
./a.txt
./a.doc
./a.mp3
(2) Exclude
Very common situation: I want to sync//usr/boot/, but do not want to copy/proc/tmp these folders
If you want to avoid a path directly add –exclude
Like –exclude "Proc."
–exclude ' Sources '
Note:the directory path is relative to the folder and you are are backing up.
Note: This path must be a relative path, not an absolute pathExample: The source server/home
Let's say this is the first command.Rsync-e ' ssh-p 30000 '-avl--delete--stats--progress demo@123.45.67.890:/home/demo/backup/
I. Exclusion of separate folders and files
To exclude the Sources folder, we can add the '--exclude ' option:
--exclude ' Sources '
The command is this:Rsync-e ' ssh-p 30000 '-avl--delete--stats--progress--
In rsync synchronization settings, if we do not want to synchronize a folder, we can use exclude to exclude the specified folder. Next, I will introduce you to the specific implementation method.
Very common: I want to synchronize/usr/boot/Under/, but I don't want to copy/proc/tmp folders.
If you want to avoid a specific path, add-exclude directly.
For example,-
Http://blog.sina.com.cn/s/blog_62e7fe670101dg9d.htmlLinux find a method that matches multiple keywords in GREP at a time by finding multiple specified files or excluding certain types of files(1) Linux find more than one specified file at a time:Find a.html and b.html
find.-name "a.html"-name "b.html"
Find. -regex '. *\.txt\|. *\.doc\|. *\.mp3 '
find.-regex '. *\.txt\|. *\.doc\|. *\.mp3 '
./a.txt
./a.doc
./a.mp3
(2)
Generally a folder such as log with tar is easy to pack
The code is as follows
Copy Code
TAR-ZCVF log.tar.gz Log
Just use the above command.
1. Exclude folder:But in the production environment log file is very large, there are dozens of G, we do not need to backup, examples exclude PROFTPD log.I checked it out on the Intern
Q: How can I avoid synchronizing specified folders? -- Exclude
Rsync -- exclude files and foldersHttp://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-foldersVery common: I want to synchronize/usr/boot/Under/, but I don't want to copy/proc/tmp folders.If you want to avoid a path, add -- exclude directly.For
This article details the implementation of the exclude exclusion file in rsync, the need for friends can refer to the
question: How to avoid synchronizing the specified folder? --exclude rsync--exclude files and folders http://articles.slicehost.com/2007/10/10/rsync-exclude
Reprint: http://blog.sina.com.cn/s/blog_62e7fe670101dg9d.html Linux find a method that matches multiple keywords in GREP at a time by finding multiple specified files or excluding certain types of files(1) Linux find more than one specified file at a time:Find a.html and b.html
Find. -name "a.html"-name "b.html"
Find. -regex '. *\.txt\|. *\.doc\|. *\.mp3 '
Find. -regex '. *\.txt\|. *\.doc\|. *\.mp3 '
./a.txt
./a.doc
Files globs would be available in TypeScript 2.0, so on the meantime, we need to use "exclude" and "RootDir" to configure W Hich files to load. This lesson shows how to switch from "files" to "exclude".curently, in Tsconfig.json, we use "files" to tell the main entry file as "Src/main". and import other file into Main.
/231.htmlHttp://www.freeflying.com/news/231.html These URLs actually point to the same page content, which is the one with ID = 231.ArticleHowever, this article is referenced by blog and news. For various reasons, the final URL is as shown above.There are two solutions: one is to use the robot protocol to "exclude" one, and the other is to permanently redirect one URL to another through 301. Today, let's talk about the robot protocol. To put it simpl
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.