LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 08-19-2004, 08:40 PM   #1
billhowe
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
batch commands to debugfs with a read-only filesystem


I'm running an up-to-date redhat 8.0 system.

I need to delete many many files via debugfs due to a corrupt filesystem. debugfs unfortunately does not accept patterns and such, so it seems I need to send N commands to delete N files.

Now, degbugfs has an option -f that allows it to accept commands from a file rather than interactively. Normally, I could generate a large file of commands and execute them as a batch. However, since my file system is partially corrupt, it mounts as read-only, so I can't create any such files.

So: Is there either 1) a command line trick to make debugfs read commands from stdin, or 2) some way to delete an entire directory of files from within debugfs with a single command?

I can tell the story of how I arrived at this state if someone thinks it is relevant...

Thanks

(Hmm, it occurs to me that my question isn't really redhat specific. Apologies if this belongs somewhere else.)

Last edited by billhowe; 08-19-2004 at 08:46 PM.
 
Old 08-21-2004, 11:02 AM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,474

Rep: Reputation: 155Reputation: 155
"Normally, I could generate a large file of commands and execute them as a batch. However, since my file system is partially corrupt, it mounts as read-only, so I can't create any such files."

You could create your file of commands in a working file system.

In any case the best solution to your problem is to recreate the corrupt file system.

--------------------------
Steve Stites
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read only filesystem ONLY greg108 Linux - General 3 08-26-2004 06:11 PM
how do I change the filesystem from read-only to read-write? les_chow Linux - Newbie 5 05-26-2004 03:14 PM
filesystem commands humanrig Linux - Hardware 2 03-15-2004 07:42 AM
.s batch file commands - pause??? webamoeba Linux - Newbie 2 01-27-2004 11:15 AM
Creating Batch Commands? reefadt Linux - Newbie 3 08-17-2003 09:46 AM


All times are GMT -5. The time now is 12:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration