[ale] Speaking of RM -RF SLASH...

Wolf Halton wolf.halton at gmail.com
Sat Feb 11 19:57:51 EST 2012


Recovering from a poorly-scoped rm - Use one of the many "safer
removal" commands.
Aaron may remember the one we built at one of the ITT Linux-fests..

http://sourcefreedom.com/?page_id=179
http://sourcefreedom.com/wp-content/uploads/2011/2/rmv.2011.02.20.tar.gz

if [ -z "$1"  ]
    then
    echo "\n        You must specify a file or folder to remove"
    echo "\n        Command syntax:

        rmv [file or folder]

         - This created the Trash2 folder, if it doesn't already exist,
           and then puts the named file or folder into Trash2.  If you
           feel the need to double-check your action, just look in the
           /home/your_profile/Trash2 folder as in the example below:

           ls $HOME/Trash2"
else

    if [ ! -e $HOME/Trash2 ]
        then
        #echo "EEEEEK"
        mkdir $HOME/Trash2
    fi

    echo ' '
    mv -v $1 $HOME/Trash2/
    # $1 is an argument on the command line
    # $HOME is current user's home folder
    echo "The file or directory $1 has been safely removed\n"
fi



On Sat, Feb 11, 2012 at 8:40 AM, JD <jdp at algoloma.com> wrote:
> He should just restore from his last backup.
>
> On 02/11/2012 08:33 AM, arxaaron wrote:
>> Excellent help! Thanks!
>>
>> He mentioned something about how he was working with "encryption"
>> on something when he made the rm -rf mistake.  In this context it makes
>> sense as to what he erased.
>>
>> Question now is if any of his home dir will be will be recoverable.
>> It's possible that he blew away his encryption keys.
>>
>> peace
>> aaron
>>
>>
>> On 2012/02/11, at 06:08 , Pablo Ordonez wrote:
>>
>>> Hi Aaron
>>>
>>> here is the file-path
>>>
>>> /home/.ecryptfs/ddddd/.private
>>> ddddd = user_account
>>> When you  install Ubuntu, it gives you the option to encrypt your
>>> home directory. That is the place where your encrypted home
>>> directory is located.
>>>
>>> running
>>>
>>> du -sh /home/ddddd/
>>> equal to
>>> du  -sh /home/.ecryptfs/ddddd/.Private/
>>>
>>>
>>>
>>> Pablo
>>>
>>> On Sat, Feb 11, 2012 at 1:00 AM, Jeremy Bicha <jbicha at ubuntu.com>
>>> wrote:
>>> On 10 February 2012 23:52, Aaron Ruscetta <arxaaron at gmail.com> wrote:
>>>> I just had a Young Friend (one of the teens in the youth
>>>> group I organize) who is delving into PC building and
>>>> Linux call me in a panic.
>>>>
>>>> Not sure exactly what he was trying to do or why yet,
>>>> but he says he issued a sudo rm -rf command on /private
>>>> and everything stopped working.  Not sure exactly what
>>>> he's blown away, but it probably included his shadow
>>>> file.  On my mac here, /private contains the actual etc
>>>> directory and /etc is just a soft link.
>>>>
>>>> We're going to work on salvaging his system tomorrow.
>>>> Any suggestions for maybe recovering reconstructing
>>>> the deleted directory? (no new writes have taken place...)
>>>> or recommendations on easy process for reinstalling to
>>>> a new hard disk and transferring system and user files?
>>>>
>>>> I think he was running Ubuntu 11.10.  Can anybody
>>>> give me a listing of what Ubuntu puts in /private these
>>>> days?
>>>
>>> There is no /private on Ubuntu.
>>>
>>> Jeremy Bicha
>>>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



-- 
This Apt Has Super Cow Powers - http://sourcefreedom.com
Advancing Libraries Together - http://LYRASIS.org



More information about the Ale mailing list