I need to copy a big file (about 30 Gb) in background via ssh. If I do it this way, and disconnect, it's copied well:
ssh server
# cp /file1 /file2 & >/dev/null 2>/dev/null ; disown;
But if I do this:
ssh server 'cp /file1 /file2 & >/dev/null 2>/dev/null ; disown;'
it waits until file copies. Why?
Best Answer
Try adding
-f
:(Tested and works for me.)
From the man page: