Hot answers tagged

5

It isn't an apostrophe in the filename. The filenames that have whitespaces are getting 'wrapped'.


3

You seem to assume that --execdir invokes a (Bash) shell that then invokes ffmpeg. That is not the case: -exec command ; Execute command; true if 0 status is returned. All following arguments to find are taken to be arguments to the command until an argument consisting of `;' is encountered. The string `{}' ...


3

pdfunite $(sed 's/$/_*.pdf/' filenames.txt) output.pdf So if filenames.txt contains CSAI_isotig00407:342-556 CSAI_isotig00408:342-556 That command will effectively do pdfunite CSAI_isotig00407:342-556_*.pdf CSAI_isotig00408:342-556_*.pdf output.pdf


2

I recently wrote an example of stuffing a shell one-liner into a find command, and this is another use case for the same. Instead of: find samples \( -iname '*.wav' -o -iname '*.mp3' \) -execdir ffmpeg -i "$(basename "{}")" -qscale:a 6 "${$(basename "{}")%.*}.ogg" \; Try: find samples \( -iname '*.wav' -o -iname '*.mp3' \) -exec sh -c 'ffmpeg -i "$1" -...


2

In a zip file, only file contents is encrypted. File metadata, including file names, is not encrypted. That's a limitation of the file format: each entry is compressed separately, and if encrypted, encrypted separately. You can use 7-zip instead. It supports metadata encryption (-mhe=on with the Linux command line implementation). 7z a -p -mhe=on Directory....


1

Unorthodox approach: zsh -c 'echo $PWD/**/*.gz(.om[1])' where () after *.gz means to use so called glob qualifiers, i.e.: . consider only plain files om sort by modification time [1] take only first element Obviusly if you are already using zsh you don't need to call it with zsh -c.


1

You can do that by using this command, find "$(pwd)" -type f -name "*.gz" -printf "%T@ %p\n"| sort -n | cut -d' ' -f 2 | tail -n 1


1

You could create an archive using your favorite tool and then use bcrypt to perform encryption/decryption. A) To create an encrypted file: tar -czf Directory.tgz /path/to/directory bcrypt Directory.tgz This will give you a Blowfish-encrypted file Directory.tgz B) To reverse this process: bcrypt Directory.tgz.bfe tar -xf Directory.tgz


1

You can use bash with parameter expansion: $ foo="abc_def_ghi_3432.zip"; echo "${foo%_*}" $ abc_def_ghi



Only top voted, non community-wiki answers of a minimum length are eligible