5

Why does this compound command report errors when copying directories? [closed]

view full story
linux-howto

http://unix.stackexchange.com – Possible Duplicate: Why does this compound command report errors when copying directories? if one executes the following two commands in one line, as follows, rm -rf dir ; cp -r dir2 dir it may complain that cp can not create directory dir/subdir: File exists but if these two commands are executed in two lines, no errors will be thrown. I am just wandering what is the difference? and more importantly, how to execute two commands in one line, with the effect exactly the same as by two lines... PS: what is in dir or dir2 is hugh, typically 4gb (HowTos)