It is easy to make a mistake when copying (cp), moving/renaming (mv), removing (rm/rmdir), creating dirs (mkdir), and changing file permissions (chmod). It would be nice to have a log to view before commit.

Is there a tool to do these actions in a "transaction" and allow before/after diff and rollback? I know my question is very broad as there are a huge number of commands that could be supported. Even if the most basic actions were supported it would be helpful.

3 Answers 3


Mbox is a sandbox tool capable of committing the filesystem changes as a whole, and it allows the user to see the diff for each change. It works by using system call interposition.


Maybe you can look at NILFS - http://nilfs.sourceforge.net/en/


AFAIK, there is no tools which supports directly transactions.

But there is for example file systems which supports snapshots like Btrfs.

If the file sizes are not very huge, I suggest you to have a look at version-control-systems (VCS) like git which can at least be used to see changes and restore to old versions. For the /etc-directory there is for example etckeeper, which also supports file permissions, that are normally not handled totally by VCS systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .