What can I do to check if a file system (data in files and the hardware) is intact or corrupt after a computer is shutdown abruptly due to power outage?  My home desktop computer was shut down by sudden power outage. The computer automatically rebooted itself after the power is back, and I then shut it down manually in the regular way. The computer runs Ubuntu 18.10, Linux 4.18.0. It has a SSD and a HDD, where the SSD holds the boot, root, and all the essential partitions, and the HDD holds one partition for data files. I think all the file systems are ext4. I want to determine if there was a corruption in any file, and if the SSD or HDD had a physical damage.  I think I can use smartmontools to check the physical damage. I am lacking a clue about how to check the data integrity. It looks that fsck can do some checks on the file system, but it looks I need to unmount the partition to inspect. How can I run fsck to inspect the SSD? Can I use a USB boot stick which has Ubuntu on it?  I would appreciate any pointers.    Edit  The 'duplicate question' link nominally answered my question, and I am closing this question.  Among the several methods suggested in the link and the comments to this question, what I actually did is the following.   I booted the computer, and ran  $ sudo tune2fs -c 1 /dev/sda4  where /dev/sda4 is the SSD. Then, I rebooted. The system started up, showed something about the disk check for a few seconds, and presented the normal log-in screen.  I also did  $ sudo tune2fs -c 1 /dev/sdb1  for the HDD. Upon reboot, the start up screen showed a progress for about a minute, and then the normal log-in screen came up.  I'm not really sure if there was no error, if a problem was fixed silently, or if there was an error, but I assume the lack of explicit warning indicates that there was no error.  Thank you for the comments and the link.
Yesterday, one of our computers dropped to grub shell or honestly, I am unsure what shell it was when we turned on the machine.  It showed that it can't mount the root filesystem or something in this sense, because of inconsistencies.  I ran, I believe:  fsck -fy /dev/sda2   Rebooted and the problem was gone.  Here comes the question part:  I already have in her root's crontab:   @reboot /home/ruzena/Development/bash/fs-check.sh    while the script contains:  #!/bin/bash touch /forcefsck   Thinking about it, I don't know, why I created script file for such a short command, but anyways...  Further, in the file:  /etc/default/rcS   I have defined:   FSCKFIX=yes    So I don't get it. How could the situation even arise?    What should I do to force the root filesystem check (and optionally a fix) at boot?  Or are these two things the maximum, that I can do?  OS: Linux Mint 18.x Cinnamon 64-bit.  fstab:  cat /etc/fstab | grep ext4   shows:   UUID=a121371e-eb12-43a0-a5ae-11af58ad09f4    /    ext4    errors=remount-ro    0    1    grub:   fsck.mode=force    was already added to the grub configuration.
What are these auxiliary file descriptors? While poking around /proc/self folder for my mksh shell,  I found a peculiar thing: in /proc/self/fd/* there are all the standard file descriptors (0 for stdin, 1 for stdout, and 2 stderr) some file descriptors, but also some extra ones - 24, 25, 3. And I technically can list them with a glob in the shell:  $ for fd in /proc/self/fd/* ; do echo $fd ; done                                                       /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 /proc/self/fd/24 /proc/self/fd/25 /proc/self/fd/3   But when I try to stat them or use find on them, they are reported as non-existent.  $ find  /proc/self/fd/*                                                                                /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 find: ‘/proc/self/fd/24’: No such file or directory find: ‘/proc/self/fd/25’: No such file or directory /proc/self/fd/3   Same occurs in bash , but just with just one auxiliary file descriptor.  $ for fd in /proc/self/fd/* ; do echo $fd; done /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 /proc/self/fd/255 /proc/self/fd/3  $ find /proc/self/fd/* /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 find: ‘/proc/self/fd/255’: No such file or directory /proc/self/fd/3   Question is: what are those additional file descriptors? What is their purpose? There are several unknown numbers in mathematics, such as optimal constants in some inequalities. Often it is enough to some estimates for these numbers from above and below, but finding the exact values is also interesting. There are situations where such unknown numbers are necessarily natural numbers, for example in Ramsey theory. For example, we know that there is a smallest integer $n$ such that any graph with $n$ vertices contains a complete or an independent subgraph of 10 vertices, but we don't know the exact value of $n$.  What kinds of unknown small (less than 100, say) integers are there? What are the smallest unknown constants which are known to be integers? Or, more rigorously, what is the smallest upper bound for an unknown but definable number that is known to be an integer?  I know that asking for the smallest unknown integer is ill-defined since we do not know the exact values. The more rigorous version of the question is well-posed, but I do not want to keep anyone from offering interesting examples even if they are clearly not going to win the race for the lowest upper bound.  An answer should contain a definition of an integer quantity (or a family of them) and known lower and upper bounds (both of which should be integers, not infinite). Conjectures about the actual value are also welcome. I have given one example below to give an idea of what I'm looking for. Allow sound file uploads in questions and answers? Should Stack Exchange introduce the ability to upload embedded sounds (maybe via HTML5/Flash, whichever the user has) as part of questions and answers to Stack Exchange?  It could require a certain amount of rep to stop new users from doing it frivolously.  My rationale behind this is the new language &amp; usage sites.  I often find myself thinking that it might be helpful, when discussing a regional dialect or something, for the person answering to just pronounce what they're trying to describe in words. Why did skilled wizards use He-Who-Must-Not-Be-Named? Pursuant to , it's plausible that the typical witch or wizard would use 'He-Who-Must-Not-Be-Named' (if they assume Taboo Spell is intact after death of Voldemort). But, why would the Aurors and those in the Ministry of Magic (who had first rate protection) also use it? Even Snape (the Half-Blood Prince) hesitated to say 'Voldemort', and he was under the protection of Dumbledore, Dumbledore being the only wizard Voldemort ever feared.  What was the point of the Death Eaters being scared to say 'Voldemort' when, ostensibly, Voldemort wasn't even alive? Yes, it's true that some believed Voldemort would return, but, at the time, it was just that -- a belief. Were people scared that the Death Eaters might give a list of all those who used Voldemort's name to Voldemort upon his return? Preview on mobile page I suggest a preview on the mobile page. For questions, answers and edits to both, like on the desktop page.  I messed up formatting often enough to be annoyed that there is no preview on the mobile page and I'm surprised that noone suggested it before (at least I didn't find anything).  If it's too performance heavy to have a live preview update after every change in the text box, there could be a preview button next to the save button which leads to a page with only the preview, a back button and a save button (and the title bar and so on). What are FML and BWSS? I see this ad sometimes and I would like to know what the acronyms are. What is the value of $p^2q + q^2r + r^2p$ for the given cubic equation? If p,q,r are the real roots of the equation $x^3-6x^2+3x+1=0$ then find the value of $p^2q + q^2r + r^2p$?  My Attempt: I tried $(p+q+r)(pq+qr+rp)$ but couldn't really figure out what to do with the extra terms. The roots are also not trivial to find. Any help would be appreciated. I am in doubt as to whether the subject-verb agreement of the second sentence of this paragraph is correct :  Unfortunately, there is no such thing as the ideal home workshop because most people are limited by the space available and by their budget. However, the information and diagram here acts as a guide to help you formulate a sensible workshop layout and a machinery “wish list”.  I suppose if the compound subject is seen as a single unit, then the sentence can be considered as correct. A little further in the same book, another sentence has a singular verb with a compound subject :  Alternatively commandeer a garage, or build yourself a substantial workshop if outdoor space and permission allows – however, do consider the impact of machinery noise on your neighbours.  Can &quot;outdoor space and permission&quot; be seen as one thing, or would this be considered a mistake ? How to read and write into file using JavaScript? If a bob attached to a string is swinging in vertical circular motion, we say that the bob leaves the circular path when the tension in the string becomes zero, but even when tension becomes zero, there's always a component of the bob's weight towards the center of the circle. Why then does the bob leave the circular trajectory? Here's the information :     There are four different pairs of   opening and closing tags which can be   used in PHP. Two of those, &lt;?php ?&gt;   and &lt;script language="php"&gt; &lt;/script&gt;,   are always available. The other two   are short tags and ASP style tags, and   can be turned on and off from the   php.ini configuration file. As such,   while some people find short tags and   ASP style tags convenient, they are   less portable, and generally not   recommended.   In my experience most servers do have short tags enabled. Typing  &lt;?=   is far more convenient than typing  &lt;?php echo    The programmers convenience is an important factor, so why are they not recommended? How to solder with one hand? I am a beginner at electronics.  I don't have many tools and stuff, so I am forced to solder by hand.   I don't have a pcb to solder on, so I usually just solder the wires together, but it's really difficult without a holder.  Is there an easier way to do this? If not, is there a substitute for a wire holder?  Any help would be appreciated. LINQ to SQL Where Clause Optional Criteria I am working with a LINQ to SQL query and have run into an issue where I have 4 optional fields to filter the data result on.  By optional, I mean has the choice to enter a value or not.  Specifically, a few text boxes that could have a value or have an empty string and a few drop down lists that could have had a value selected or maybe not...  For example:      using (TagsModelDataContext db = new TagsModelDataContext())      {         var query = from tags in db.TagsHeaders                     where tags.CST.Equals(this.SelectedCust.CustCode.ToUpper())                      &amp;&amp; Utility.GetDate(DateTime.Parse(this.txtOrderDateFrom.Text)) &lt;= tags.ORDDTE                     &amp;&amp; Utility.GetDate(DateTime.Parse(this.txtOrderDateTo.Text)) &gt;= tags.ORDDTE                     select tags;         this.Results = query.ToADOTable(rec =&gt; new object[] { query });     }   Now I need to add the following fields/filters, but only if they are supplied by the user.   Product Number - Comes from another table that can be joined to TagsHeaders. PO Number - a field within the TagsHeaders table. Order Number - Similar to PO #, just different column. Product Status - If the user selected this from a drop down, need to apply selected value here.   The query I already have is working great, but to complete the function, need to be able to add these 4 other items in the where clause, just don't know how! Consider the blow-up of the plane in one point. Let $E$ the exceptional divisor. We know that $(E,E)=-1$. What is the geometrical reason for which the auto-intersection of $E$ is $-1$? In general, what does it mean, geometrically, that a divisor has a negative self-intersection or that the "right" number of divisors gives rise to a negative intersection?  Thanks. Programmatically determining amount of parameters a function requires - Python Joining multiple records to single feature using QGIS I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS? I have a code that prints a table with 2 rows. I want to keep format of it and change 2 rows into 3.   \documentclass[conference]{IEEEtran}  \usepackage{pgfplots} \usepackage{siunitx} \usepackage{multirow} \begin{document}  \begin{table}[h] \caption{Family data set results} \label{tbl::Fam} \centering \begin{tabular}{|l|l|c|c|c!{\vrule width 2pt}l|l|c|c|c|} %\noalign{\hrule height 2pt} \hline \textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}l&amp;\textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}\\\hline \multirow{2}{*}{age}&amp;Original&amp;9&amp;2.8&amp;100&amp;\multirow{2}{*}{employer\_type}&amp;Original&amp;13&amp;2&amp;10\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;95&amp;96&amp;&amp;PrivBayes&amp;2&amp;100&amp;100\\\hline \multirow{2}{*}{education\_level}&amp;Original&amp;7&amp;2&amp;98&amp;\multirow{2}{*}{marital\_status}&amp;Original&amp;10&amp;2&amp;100\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;6&amp;96&amp;&amp;PrivBayes&amp;2&amp;6&amp;100\\\hline \hline %\noalign{\hrule height 2pt} \end{tabular} \end{table}  \end{document}   In this picture, I have 2 algorithms {Original, PrivBayes}. I want to change 2 algorithms into 3 algorithms with keeping the format of table. Can you please help me to do it? How can I prove these statements? Commas with "so" I am confused with the usage of so.  Consider some examples from Oxford and Meriam-webster        It was still painful so I went to see a doctor (Oxford).   We were bored with the movie, so we left (MW).   There are no more chairs available, so you'll have to stand (MW).      So is a conjunction in all the above sentences. But I don't understand when to place a comma before it. So is one of FANBOYS. Thus, we have use a comma when it connects two independent clauses, which I think contradict the first sentence.  Is the placement of comma before so depends on a style guide? For example, Americans prefer a comma while the British doesn't. My laptop is filled with viruses and Windows XP is just becoming impossible to work with.   I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh?