Tag Info

Hot answers tagged


If your pax supports the -0 option: find . -type 'f' -path '*downloads*' -print0 | pax -rw0s'|.*downloads/||' /mydir


I need advice/best practice on how I can avoid keying in passphrase when I add this crontab to run everyday. Create a new ssh key with an empty password, specially for this task. Save it in a file, say, ~/.ssh/cron. Add its corresponding public key to ~/.ssh/authorized_keys on the remote machine. When you run your scp from cron(8) do it with the new ...


If you just run find, it has to go through all the subdirectories to find all the files. It looks like you expect the file to be at a low depth, so you could pass the -maxdepth argument to limit the depth of the search, e.g. find /mnt/build/my_project/ -maxdepth 3 -wholename "*${BUILD_NAME}*/foo.tar.gz" -type f Alternatively, you could skip find ...

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