LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 02:26 AM   #1
gael33
Member
 
Registered: Feb 2009
Location: Scotland
Distribution: Linux Mint 18.0 Cinnamon 64 bit
Posts: 302

Rep: Reputation: 20
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, 05:08 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Hi,

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

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

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
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, 06:27 AM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

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


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


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