FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-11-2010, 04:58 PM
ubiquitous1980
 
Default Uh Oh!! Made the contents of my directory unreadable

With this command or similar, I made my directory and one file in /
unreadable:

for entry in $(find $HOME); do $entry >> found; done

the same of output for ls is similar:

????????-k?x?B?{????U?I?3s??
???N???Q
?ܝw?Ϭw??9c̃}}Wz????Ǹ??t
Ƿ~???
?^8?O?
?^???*?cB?f???????v????????V?!?@
???8%??????{??8?y??R??g??
??=c
?$??????̝????????????~Ќ?t?)i}ˌW?6?
??:????G?x??g*D???S(?I%?=?m?ۼVݶT??ն)u??K[(????[??4?u???g?_??1M???QL?8*9?P
㓋?8M??4=?*?w3?m?'?Dv??u? ?s?Ƭ????A?q??a]??~:??????.Kd??뗕oi?y????6:˿???
N}Y?C????*?W*?W???K0???vY? Z?1??
?U0?T*?A??̻?ɸ?ȶ?IJ???????????????????

Any ideas on how to fix this?
 
Old 02-11-2010, 05:18 PM
Alan McKinnon
 
Default Uh Oh!! Made the contents of my directory unreadable

On Thursday 11 February 2010 19:58:25 ubiquitous1980 wrote:
> With this command or similar, I made my directory and one file in /
> unreadable:
>
> for entry in $(find $HOME); do $entry >> found; done
>
> the same of output for ls is similar:
>
> ????????-k?x?B?{????U?I?3s??
> ???N???Q
> ?ܝw?Ϭw??9c̃}}Wz????Ǹ??t
> Ƿ~???
> ?^8?O?
> ?^???*?cB?f???????v????????V?!?@
> ???8%??????{??8?y??R??g??
> ??=c
> ?$??????̝????????????~Ќ?t?)i}ˌW?6?
> ??:????G?x??g*D???S(?I%?=?m?ۼVݶT??ն)u??K[(????[??4?u???g?_??1M???QL?8*9?P
> 㓋?8M??4=?*?w3?m?'?Dv??u? ?s?Ƭ????A?q??a]??~:??????.Kd??뗕oi?y????6:˿???
> N}Y?C????*?W*?W???K0???vY? Z?1??
> ?U0?T*?A??̻?ɸ?ȶ?IJ???????????????????
>
> Any ideas on how to fix this?


Is the output given from the same shell session in which you ran the command?

Switch to a text console (Ctrl-Alt-Fx) and ls things there, perhaps the
garbage dumped to the screen in your for simply upset the terminal emulation.


--
alan dot mckinnon at gmail dot com
 
Old 02-11-2010, 06:47 PM
Neil Bothwick
 
Default Uh Oh!! Made the contents of my directory unreadable

On Thu, 11 Feb 2010 20:18:29 +0200, Alan McKinnon wrote:

> Switch to a text console (Ctrl-Alt-Fx) and ls things there, perhaps the
> garbage dumped to the screen in your for simply upset the terminal
> emulation.

In which case, running reset in the affected terminal should clear it.


--
Neil Bothwick

Bookmark - A means of returning to where you got lost last time.
 
Old 02-11-2010, 07:07 PM
Peter Humphrey
 
Default Uh Oh!! Made the contents of my directory unreadable

On Thursday 11 February 2010 18:18:29 Alan McKinnon wrote:

> perhaps the garbage dumped to the screen in your for simply upset the
> terminal emulation.

...in which case, perhaps typing RESET in the terminal will help.

--
Rgds
Peter.
 
Old 02-11-2010, 07:32 PM
Alan McKinnon
 
Default Uh Oh!! Made the contents of my directory unreadable

On Thursday 11 February 2010 21:47:33 Neil Bothwick wrote:
> On Thu, 11 Feb 2010 20:18:29 +0200, Alan McKinnon wrote:
> > Switch to a text console (Ctrl-Alt-Fx) and ls things there, perhaps the
> > garbage dumped to the screen in your for simply upset the terminal
> > emulation.
>
> In which case, running reset in the affected terminal should clear it.

Every time I've tried to tell people to do that, they tell me they can't do it
because

%#!*^

obviously is not a valid command.

I've given up explaining :-)


--
alan dot mckinnon at gmail dot com
 
Old 02-11-2010, 09:26 PM
Neil Bothwick
 
Default Uh Oh!! Made the contents of my directory unreadable

On Thu, 11 Feb 2010 22:32:44 +0200, Alan McKinnon wrote:

> > In which case, running reset in the affected terminal should clear
> > it.
>
> Every time I've tried to tell people to do that, they tell me they
> can't do it because
>
> %#!*^
>
> obviously is not a valid command.

It's not, if it were reset the second and fourth characters would be the
same :P

This tagline generator's at it again


--
Neil Bothwick

Light travels faster than sound. This is why some people appear bright
until you hear them speak.
 
Old 02-11-2010, 09:35 PM
Alan McKinnon
 
Default Uh Oh!! Made the contents of my directory unreadable

On Friday 12 February 2010 00:26:56 Neil Bothwick wrote:
> On Thu, 11 Feb 2010 22:32:44 +0200, Alan McKinnon wrote:
> > > In which case, running reset in the affected terminal should clear
> > > it.
> >
> > Every time I've tried to tell people to do that, they tell me they
> > can't do it because
> >
> > %#!*^
> >
> > obviously is not a valid command.
>
> It's not, if it were reset the second and fourth characters would be the
> same :P

Smartass :-)

You owe me a year's subscription from your employer for that wise-crack.
Postage paid by sender, naturally.


--
alan dot mckinnon at gmail dot com
 
Old 02-11-2010, 10:18 PM
Iain Buchanan
 
Default Uh Oh!! Made the contents of my directory unreadable

On Fri, 2010-02-12 at 01:58 +0800, ubiquitous1980 wrote:
> With this command or similar, I made my directory and one file in /
> unreadable:
>
> for entry in $(find $HOME); do $entry >> found; done

er... you just executed everything in your home directory and piped the
output to a file... I think you wanted "do echo $entry"? or the simpler
"find $HOME >> found"?

anyway, it shouldn't have corrupted your filesystem, but it looks like
it did.

> Any ideas on how to fix this?

you probably want to shutdown and fsck your filesystem. Then, start
looking for your backups

--
Iain Buchanan <iaindb at netspace dot net dot au>

Even with nougat you can have a perfect moment.
-- (Terry Pratchett, Thief of Time)
 
Old 02-11-2010, 10:34 PM
Alan McKinnon
 
Default Uh Oh!! Made the contents of my directory unreadable

On Friday 12 February 2010 01:18:33 Iain Buchanan wrote:
> On Fri, 2010-02-12 at 01:58 +0800, ubiquitous1980 wrote:
> > With this command or similar, I made my directory and one file in /
> > unreadable:
> >
> > for entry in $(find $HOME); do $entry >> found; done
>
> er... you just executed everything in your home directory and piped the
> output to a file... I think you wanted "do echo $entry"? or the simpler
> "find $HOME >> found"?
>
> anyway, it shouldn't have corrupted your filesystem, but it looks like
> it did.

I thought the same and wondered "How? How could it corrupt stuff?"

So assuming the for did do the corruption and it isn't coincidence, what would
make this happen? Or is the OP just seriously out of luck and hit the one in a
gazillion unjackpot?

--
alan dot mckinnon at gmail dot com
 
Old 02-11-2010, 10:47 PM
ubiquitous1980
 
Default Uh Oh!! Made the contents of my directory unreadable

Iain Buchanan wrote:
> On Fri, 2010-02-12 at 01:58 +0800, ubiquitous1980 wrote:
>
>> With this command or similar, I made my directory and one file in /
>> unreadable:
>>
>> for entry in $(find $HOME); do $entry >> found; done
>>
>
> er... you just executed everything in your home directory and piped the
> output to a file... I think you wanted "do echo $entry"? or the simpler
> "find $HOME >> found"?
>
> anyway, it shouldn't have corrupted your filesystem, but it looks like
> it did.
>
>
>> Any ideas on how to fix this?
>>
>
> you probably want to shutdown and fsck your filesystem. Then, start
> looking for your backups
>
>
Did just that. But no luck with fsck. So I had a tarballed and bzip2ed
backup from about a month ago and used that. Thanks for the suggestions
anyway guys
 

Thread Tools




All times are GMT. The time now is 07:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org