Undo last command function, undo all terminal session commands
Hey you command line gurus
I was wondering if there exists such a command as
- Undo last command function
- Undo all terminal session commands
- Undo configure/make/make install commands
How useful that would be!
I could experiment without fear of ramifications, especially because many build attempts create disarray and files everywhere. Also sometimes terminal commands are cryptic and I do not understand what I'm doing so I have to be able to try and then undo.
What is universal undo command? For last command and all session commands? For undo configure/make/make install commands?
Edit: now of course, there will be commands that are reversible such as formatting disk etc. but for those that are possible my question is directed to them
How to remove the last command
Open terminal and type:
defaults write com.apple.finder AppleShowAllFiles Yes
Now open finder and follow this directory: /Usr/bin
This is the folder in which all ther terminal commands are contained, so if you want to un-do the terminal command find it and delete it.
Deleting last has no adverse affects.
I would not recomend deleteing all the files in this folder first try moving it to a different location and see what happens. Removing some of these files may cause your computer to act differently so only delete the bare minimum.
EDIT: The only terminal command that i know of is echo "TEXT GOES HERE" . it will in turn display the text you want. Place the file in the directory mentioned above