Find the answer to your Linux question:
Results 1 to 4 of 4
I'm interested in writing a (hopefully) simple Linux Shell Script. Upon shutdown of the system (or upon reboot), I would like the script to automatically reset any changes made during ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    2

    Linux Shell Script

    I'm interested in writing a (hopefully) simple Linux Shell Script.
    Upon shutdown of the system (or upon reboot), I would like the script to automatically reset any changes made during that session. This includes files saved to the hard disk as well as any configuration changes. I would also like the script to be run only with guest accounts, the administrative account would not have the script run.

    Can anyone help me out? I'm not even sure where to start.

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Save a snapshot of the state you wish to preserve (in a tar archive, for example). Then just throw away everything in the user's home directory and restore your snapshot.

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    2
    Thank you. Does anyone know how I can integrate that into a command-line shell script?

  4. #4
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    How about trying it yourself? You can always come back if you get stuck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...