Part of a script I am writing utilizes rm -rf
to completely remove two directories.
These directories are relatively large and can take a considerable amount of time to remove.
Currently the directories are removed sequentially:
rm -rf dir1
rm -rf dir2
Would it be any faster to remove them simultaneously in the background via:
rm -rf dir1 &
rm -rf dir2 &
wait
If so why?
rm
in sequence. – Kusalananda Jun 23 '16 at 19:55