Tag Info

New answers tagged


You can use cp's --parents switch: $ mkdir -p step1/step2/step3 $ touch step1/step2/step3/file $ mkdir copy $ cp --parents step1/step2/step3/file copy $ ls copy/step1/step2/step3/file copy/step1/step2/step3/file mv, however, does not have a --parents switch, but you could do something like: $ find step1/step2/step3 -name "file" -exec cp --parents {} ...


find /home/odroid/USBHD/Movies/ -iname "*.mkv" -mtime '-1' -print0 | xargs -0 -I{} rsync -a --ignore-existing {} /home/odroid/NASVD/Movies/


I suspect part of your issue is with the way you're constructed your heredoc. Try it like so: $ ftp -n ${FTP_HOST} << STOP user ${FTP_USERNAME} ${FTP_PASSWORD} binary lcd ${FTP_FROM_DIR} cd ${FTP_TO_DIR} put ${reportFileName} STOP If you truly want those spaces/tabs in the command then you'll need to change to this form of the heredoc: $ ftp -n ...

Top 50 recent answers are included