LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-22-2010, 01:26 AM   #1
gael33
Member
 
Registered: Feb 2009
Location: Scotland
Distribution: Linux Mint 20.1 Cinnamon 64 bit
Posts: 343

Rep: Reputation: 22
Question Run a file check from Terminal in Ubuntu 10.10


Occasionally Ubuntu runs a file check, and I assume repair if necessary, at start-up. what do I type into Terminal if I want to run a file check without waiting for the automatic file check to start?
The reason I ask is that my system wouldn't boot last week and after several attempts to reboot, the automatic file check came into play and corrected whatever was wrong. This process of rebooting my system several times before Ubuntu fixed itself was very time consuming and frustrating. I dare say that there is a command line to trigger this file check and I would appreciate it if someone with greater knowledge than I could supply it.

Thank you.
 
Old 12-22-2010, 04:08 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Hi,

Take a look at
fsck
http://linux.die.net/man/8/fsck

Kind regards
 
Old 12-22-2010, 05:20 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Be aware that you can't (as in shouldn't) run fsck against a mounted filesystem. It'll maybe/probably be o.k., but you'll never know, and never be able to prove it.
Especially the root, as likely is your issue - you can generally force a fsck at the next boot by using "shutdown -F" (as root). Depends on distro, but I'd be pretty confident Ubuntu support it.
 
Old 12-22-2010, 05:27 AM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by gael33 View Post
Occasionally Ubuntu runs a file check, and I assume repair if necessary, at start-up. what do I type into Terminal if I want to run a file check without waiting for the automatic file check to start?
The reason I ask is that my system wouldn't boot last week and after several attempts to reboot, the automatic file check came into play and corrected whatever was wrong. This process of rebooting my system several times before Ubuntu fixed itself was very time consuming and frustrating. I dare say that there is a command line to trigger this file check and I would appreciate it if someone with greater knowledge than I could supply it.

Thank you.
You can run this anytime:

PHP Code:
shutdown --F now 
Whenever you want to reboot, this command will force a filesystem check during reboot.
 
  


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
[SOLVED] how to run a .cpp file in terminal? the_rastaman Gentoo 5 04-11-2010 10:40 PM
File system check on every start -- Ubuntu 9.04 ffilc7373 Linux - Newbie 2 12-18-2009 03:33 PM
Run Ubuntu Faster - Check this Out taurusx5 Linux - Software 3 02-23-2008 11:18 PM
config file for gnome terminal [ubuntu] ZiTriX Linux - Newbie 2 11-25-2006 08:42 PM
How to run MP3 file thru Terminal in K.D.E or Terminal itz2000 Linux - Newbie 5 08-04-2005 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:42 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