How would one go about using sed in order to insert
rm -rf
at the start of each line of a file?
Use sed 's insert ( i ) option which will insert the text in the preceding line.
sed 's/^/rm -rf /' filename
EDIT
Xargs would be simpler way to delete all of the files listed in another file
xargs -a filename rm -rf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With