I've started learning bash scripting by using this guide:   However I got stuck at the first script:  cd /var/log cat /dev/null &gt; messages cat /dev/null &gt; wtmp echo "Log files cleaned up."   What do lines 2 and 3 do in Ubuntu (I understand cat)? Is it only for other Linux distributions? After running this script as root, the output I get is Log files cleaned up. But /var/log still contains all the files.
I would like a brief explanation of the following command line:  grep -i 'abc' content 2&gt;/dev/null
Solutions of bivariate cubic Diophantine equation The problem is what are the integer solutions to  $$7x^2 - 40xy + 7y^2 = (|(x - y)| + 2)^3$$  I only got $x - y = 4 (\mod 13)$. Also, how to solve it? need a regex to parse a csv file with double quotes in php Are Windows file timestamps timezone aware? Isle vs. Island Some islands are called isle like "Isle of Man", "Isle of Tortuga" and the "British Isles". Other islands are called island, like "Island of Malta" or "Island of Cyprus".  What is the difference between the words? How to know if a land mass confined by water is called an isle or an island? Using indefinite articles before adjectives: "Let's have a good breakfast" Let's have breakfast    Let's have a good breakfast      I've learned that indefinite articles aren't used before uncountable nouns, so why is a used before the adjective "good" here?    Is there an exception to the rules or is it wrong? Let's say when I do ls -li inside a directory, I get this: 12353538 -rw-r--r-- 6 me me 1650 2013-01-10 16:33 fun.txt  As the output shows, the file fun.txt has 6 hard links; and the inode number is 12353538. How do I find all the hard links for the file i.e. files with the same inode number? I was thinking about something the other day (that is probably stupid), and thought this would be a good place to talk about it.  If someone wanted to draw its family tree over the last 1000 years, he'd write a binary tree with a depth of about 40 (counting 25 years on average between each generations). This tree would have 240 leaves, or about 1012 ancestors on the deeper level. That is obviously much more than the total world population and a stupid figure when you think about it.  The only explanation that I can think of is that a real genealogy tree must have "linked" branches at several levels that change the actual number of ancestors. Anyway, for an average person, how many ancestors would that make? Could one assume that all or nearly all of the persons that lived in its country or world region a 1000 years ago would be part of its ancestors? I grew up learning that the comma must be placed there, but it seems like an unnecessary interruption in a phrase that isn't ever spoken that way. What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well. What does the '=>' syntax in C# mean? Profile tab hyperlink should match name change Is this mold? Black? White? Zip folder without including path to folder and require only one argument I'm trying to make a zip function that'll do all the steps I typically do when zipping a file or folder. Say my current directory is ~, and I want to zip a folder named Folder1, whose file path is ~/Folder2/Folder1.  Issuing  cd ~/Folder2 &amp;&amp; zip -r Folder1 Folder1 &amp;&amp; cd -   does exactly what I want. Namely, it zips so that the output Folder1.zip does not contain folders that lead up to the folder I'm zipping (namely, /home/user/Folder2), it zips recursively, and it takes in the first argument of zip with the exact name as the file or folder I'm zipping (Folder1.zip).  So I want to make a function in my .zshrc something akin to  coolerzip() { cd /path/to/file &amp;&amp; zip -r file file &amp;&amp; cd - }   where it need only take in one argument, which in this case, it will be ~/Folder2/Folder1. Then Folder1 will be the name for both files in coolerzip, and I will cd right into ~/Folder2 so Folder1 lies in my current directory before zipping. Is there any way I can achieve this so that coolerzip only requires one argument rather than three? Why is there no absolute maximum temperature? Sum of First $n$ Squares Equals $\frac{n(n+1)(2n+1)}{6}$ I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other? Basic desktop actions are not available on Ubuntu 20.04 In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag &amp; drop with icons deactivate the &quot;mouse over&quot; highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window. Capacity of pen drive shown is less than the actual I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the dd command.    Today, when I inserted the pen drive, the I am unable to write anything on to it.  When I open gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.   Here is the fdisk -l output.   Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6   What's wrong with the pen drive? How can I recover the lost space?   Device Boot      Start         End      Blocks   Id  System   When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:  Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb.  (udisks-error-quark, 0) Proof of properties of injective and surjective functions. I'd like to see if these proofs are correct/have them critiqued.     Let $g: A \to B$ and $f: B \to C$ be functions.  Then:   (a) If $g$ and $f$ are one-to-one, then $f \circ g$ is one-to-one.   (b) If $g$ and $f$ are onto, then $f \circ g$ is onto.   (c) If $f \circ g$ is one-to-one, then $f$ is one-to-one?   (d) If $f \circ g$ is one-to-one, then $g$ is one-to-one?   (e) If $f \circ g$ is onto, then $f$ is onto?   (f) If $f \circ g$ is onto, then $g$ is onto?     (a)  Let $a,b \in A$.  If $(f \circ g)(a)=(f \circ g)(b)$, then $f(g(a))=f(g(b))$.  Since $f$ is one-to-one, we know that $g(a)=g(b)$.  And, since $g$ is one-to-one is must be that $a=b$.  Hence $f \circ g$ is one-to-one.    (b) Since $f$ is surjective we know that for all $c \in C$ there is a $b\in B$ such that $f(b)=c$.  Since $g$ is surjective, there is a $a \in A$ such that $g(a)=b$.  Hence, for all $c \in C$ there is an $a \in A$ such that $(f \circ g)(a)=f(g(a))=f(b)=c$.    (c)  This is false.  Let $A=\{1\}$, $B=\{1,2\}$, and $C=\{1\}$. Define $g(1)=1$ and $f(1)=f(2)=1$. Then $f \circ g$ is injective, but $f$ is not injective.    (d)  This is true.  Let $a,b \in A$ where $a \neq b$.  If $(f\circ g)(a)\neq(f\circ g)(b)$, then $f(g(a))\neq f(g(b))$.  Hence $g(a) \neq g(b)$.  (e)  Since $f \circ g$ is surjective, then for every $ c \in C$ there is an $a \in A$ such that $f(g(a))=c$.   Let $b = g(a)$.  Then $b \in B$ and $f(b)=g(f(a))=c$.  Thus $f(b)=c$.  Hence $f$ is surjective.  (f)  Using the same set up as part (c), we have that $g$ is not surjective since there is nothing in $A$ such that $g$ will go to 1. Unable to SSH to my virtual machine via Windows Power Shell ISE How to enable touchpad? Yesterday, suddenly my touchpad on my MSI Laptop started to not respond. In other words, in Login screen, touchpad is working as expected. However, in Desktop screen, after I have logged in, touchpad is not working.  How can I enable touchpad in Desktop?