| PLEX86 | ||
|
Copy with an exclude filterfind, grep, and cpio will help out quite a bit. You can use find to generate a list of files, grep to further winnow the list, and cpio to actually copy the files. So for example: cd $src # Copy all files without a .txt suffix. find .! -name '*.txt' -print cpio -pd $dst can u help me can anyone help me with my homework? Here is some information about my homework. Revision Control in Multiuser Settings: --------------------------------------- We have seen some facilities of OpenOffice Writer for tracking... # Copy files newer than 'flagfile' find . -newer flagfile -print cpio -pd $dst # Copy files except those in directories named 'cache' find . -name cache -prune -o -print cpio -pd $dst When using the '-newer' flag, remember that you can use the 'touch' command to create files with a specific modification date, so if you want to find files created after 10-31-2005, you could do this: touch -t 200510310000 flagfile Find by itself can't match a *range* of file sizes. However: find . -printf '%b %p-n' sed 's-^0-9*-' cpio -pd $dst This uses -printf to prefix every file with its size in blocks, awk to filter only the lines matching the required size range, and sed to strip off the size from the output. We can't use '{print $2}' in awk because filenames may contain spaces. See the 'find' man page for more information. -- Lars -- This email address will expire on 2005-11-23.
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||