Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3656  / 2 Years ago, wed, november 9, 2022, 11:10:39

Lets say I wanted to wildcard directories and then wildcard all files in those directories.



How would I do so?



I know * is to wildcard all files, but I don't know how to wildcard directories.



For example pdf2djvu -o /dir/[wildcard dirs]/[wildcards.djvu] /dir/[wildcard dirs]/[wildcards.pdf]



On a secondary note can such a wildcard be affected if the location had a space where normally typing with "" for spaces it would be better to use - this time?



I tried what I posted above using the standard * for the wildcard dirs and wildcard files like /dir[entire dir had no spaces]/*/*.djvu but got the following error



I/O error (basic_ios::clear)


More From » directory

 Answers
1

One possible workaround is to use somethig like:



find . -iname *.pdf | xargs -I% pdf2djvu -o % %.djvu


This would find all pdf files starting in the current directory (recursive) and run the pdf2djvu command to produce file.pdf.djvu files.


[#31936] Wednesday, November 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
saucdisr

Total Points: 4
Total Questions: 102
Total Answers: 117

Location: Ecuador
Member since Thu, Jun 4, 2020
4 Years ago
;