Bash – How to UNDO in Bash

bashundo

I accidentially copied my whole home directory into one of my subdirectories, causing me to exceed my disk quota on a server.

Or does anyone know how to undo a command in general?

Best Answer

Bash is just a command-line interpreter - it does what you tell it to do and doesn't have an undo helper program. You're best of just deleting the subdirectory with something like:

chmod -R 775 ~/yoursubdir && rm -rf ~/yoursubdir
Related Question