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?
feedback
|
|
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:
| |||||
feedback
|
|
I'm pretty sure there's no such thing. If there was, that would be pretty interesting. For your case you can just remove the subdirectory
But be careful with that command, as it can fully delete any files from the sub-directory without any confirmation. ;) | ||||
|
feedback
|
|
When it comes to the shell, you are the undo. The opposite of copying is deleting (rm), so delete the copies. I recommend installing the trash-cli package, and then setting these Bash aliases:
Of course, in your case, since you're out of disk space, you probably don't want to trash the files first. Even so, it's a good practice to use the trash. | |||
|
feedback
|