'exclude' syntax for excluding multiple files/directories

Post here if you have questions about how to use the program
RonC
Posts: 7
Joined: Sat Feb 27, 2010 12:29 pm
Location: Funchal

'exclude' syntax for excluding multiple files/directories

Postby RonC » Thu Mar 25, 2010 12:03 am

The December 14 illustrations on exclude syntax described everything, except for one point:

Also it's important to understand how --exclude is implemented:
1) "--exclude=xxx" can match both files and directories (including links, special files, ...)
2) when "--exclude=xxx" matches a directory, all its files/subdirs are ignored
3) "--exclude=sbin" will exclude both /sbin, /usr/sbin, /usr/local/sbin, ...
4) "--exclude=/sbin" will exclude only /sbin
5) shell asterisks can be used: "--exclude='*.[ch]" will exclude "*.c" and "*.h"
6) "--exclude=xxx" can be used during "restfs" as well as "savefs"


What's the syntax for excluding multiple files/directories, not containing common characters in their names? May it be done with a single exclude statement, and if yes, how are the parameters supposed to be separated??

[Edit: may I guess, from searching elsewhere for similar command structures, you simply concatenate them, each separated from the other with a space character? ]

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: 'exclude' syntax for excluding multiple files/directories

Postby admin » Sun Apr 11, 2010 8:20 am

You can just do that:

Code: Select all

--exclude=myfile1.txt --exclude=pagefile.sys --exclude='*.tmp' --exclude=/var/tmp

RonC
Posts: 7
Joined: Sat Feb 27, 2010 12:29 pm
Location: Funchal

Re: 'exclude' syntax for excluding multiple files/directories

Postby RonC » Sun Apr 11, 2010 3:01 pm

Thanks! I was going to guess just separating the file names themselves, one after another, with a space, but now I don't have to guess.


Return to “How to use FSArchiver”

Who is online

Users browsing this forum: No registered users and 1 guest