Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2005 11:13:41 +0200
From:      Karel Miklav <karel@inetis.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: undelete in FreeBSD?
Message-ID:  <42E5FEC5.7080305@inetis.com>
In-Reply-To: <42E5E0A1.7010600@aboutsupport.com>
References:  <20050726024807.E825D1D936@imss.sgp.fujixerox.com>	<42E5D145.4050200@inetis.com> <42E5E0A1.7010600@aboutsupport.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter wrote:
> this tip is taken from BSD hacks

I do not believe this! This girl literally stole my script,
traveled back through time to cover the tracks and made an
article out of her shameless act :)

Anyway, here's the original version of 'the trash':

#! /bin/sh

# Move files in a trash folder.

trash_root=$HOME/.trash
trash_stamp=`date +%Y%m%d%H%M%S`
trash_dest=$trash_root/$trash_stamp

if [ ! -d $trash_root ]; then
   mkdir -p $trash_root
fi

if [ -e $trash_dest ]; then
   echo "Ups, $trash_dest exists!"
else
   mkdir $trash_dest
   mv $@ $trash_dest/
   echo "Files trashed."
fi

-- 

Regards,
Karel Miklav




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42E5FEC5.7080305>