Find - Excluding multiple Directories w/o showing files within
Object: Create backup file of chosen directory with 'tar'.
I am trying to write a bash script using 'find' to produce an input file to 'tar'.
The line that creates the input file is below.
find . -type d \( -name JAVASCRIPT -o -name 'jqueryinaction*' \) -prune -o -print | sort > /home/rick/Desktop/tar-include-file
This does exclude the directories I don't want in the current directory and creates the file but it includes all the individual file names also.
I've also tried to use -path in the above with the same results.
The line below creates the correct format but, of course, includes the directories that I don't want.
find . -type d | sort > /home/rick/Desktop/b1-include-file
Thanks in advance for any help you can give me.
R
|