[Gllug] Is this funny
Steve Cobrin
cobrin at highbury.net
Mon Dec 31 20:13:57 UTC 2001
On Monday 31 Dec 2001 11:18 am, Jackson, Harry wrote:
> Hi all
>
> I was reading some posts and came across this on sourceforge
>
> Hi,
>
> I erased a 60Gb company disk by typing:
> cp test.txt /dev/hdc
>
> The disk contained one ext2 partition.
> What to do.....
> (I have an excatly the same empty spare disk.)
>
> A solution will be rewarded.....
Depending on how big the text file was, its probably not too bad. Just fsck
with alternative superblock (see man e2fsck for details) unless the partition
table was overwritten, in which case just run fdisk and recreate the
partitions (with the exactly the same sizes as before), then run e2fsck. In
really dire cases, recreate a skeleton file system on the corrupted
partitions.
>
> Is this a complete wipe and if so could someone tell me why. It did make me
> laugh though. I was also wondering if I had the following script
> #######################
> #! /bin/bash
> echo $1
>
> history | grep $1
> #######################
>
> How can I get the output to appear on the console it was called from. I
> know its simple but I know not what or how.
>
err, if this script is executed, it automatically will send its output to the
controlling tty. If however you want to send it to *the* console, then just
redirect it to /dev/console
Oh yeah, it is real funny! It implies that the perpetrator shouldn't have
been let loose as super-user on the machine.
> Regards;
> Harry Jackson.
-- Steve
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list