|
I don't see how that command could have wiped the ps binary as there is no redirection to a file, only a pipeline into another command. A useful trick in ksh is to set the noclobber option which prevents accidental overwrite of existing files -- even for root.
# set -o noclobber
# /usr/ucb/ps -auxww 3589 > out
# /usr/ucb/ps -auxww 3589 > out
ksh: out: file already exists
Use the >| syntax for force an overwrite:
# /usr/ucb/ps -auxww 3589 >| out
|