LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,341

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration