LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2005, 01:15 AM   #1
Linuxuser_81
LQ Newbie
 
Registered: Sep 2005
Posts: 8

Rep: Reputation: 0
fsck -t option


hi

I am new to Linux. I am writing a bash script to do a filesystem check in all the filesystems except vfat, dos and root specified in /etc/fstab. From the man page I found that the -t option will help me to solve this problem.

but I am not sure of the syntax of the command.

can someone please gimme an example syntax.

currently in the bash I used the following syntax and it throwed me an error

#fsck -ARs -t !dos,!vfat

Thanks for ur time.

-MJ
 
Old 10-03-2005, 03:17 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Maybe I'm completely off, but I'd think that you can't
negate what wouldn't be checked in the first place?

As far as I know fsck has no means to check these
two in the first place.


Cheers,
Tink
 
Old 10-03-2005, 04:02 AM   #3
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Try this
Code:
fsck -ANt nodos,novfat
A - Check all listed in fstab
R - Omit / filesystem if it's already mounted
t nodos,novfat - Do not check dos and vfat type fs

Running fsck on mounted fs is not recommended since it can cause fs damage. So you would prefer to do a read-only fsck on such. (Check -n option)

-s option (in your entry) tells to serialize the checks (this is not recommended if you intend to use fsck non-interactively)

Last edited by SkyEye; 10-03-2005 at 04:09 AM.
 
Old 10-03-2005, 07:41 AM   #4
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Uh, someone should explain that there is no need to write a script to run fsck at all............In most distros, fsck run automagically after a filesystem has been mounted 20 times (slackware is one )..........fsck will also run automatically IF a filesystem was un-mounted improperly.....(like after a hard re-boot ).........you can change the setting so fsck runs after 5 or 10 mountings, but there is no need really to mess with it............
 
Old 10-03-2005, 07:48 AM   #5
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Yes, quite right. Most distros have sheduled fscks and in unexpected system halts. But there may be requirements, where you need to do manual fsck.

Anyway Linuxuser_81 didn't say what was his/her requirement. So I assumed that he knows what he is doing, and gave him some tip.
 
  


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
2 fsck or not 2 fsck? naps SUSE / openSUSE 4 03-18-2005 03:11 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
How to use Fsck pembo13 Linux - General 4 04-20-2004 12:00 PM
Fsck Soulful93 Linux - Newbie 2 03-18-2004 03:00 PM
fsck leihsun Linux - General 1 07-02-2002 07:47 AM


All times are GMT -5. The time now is 07:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration