#Linux 5 [wget, date, sed, man, setterm] useful cli oneliners.

in #linux4 years ago (edited)
  • WGET Download an entire website with a single command:
<pre><code>wget --random-wait -r -p -e robots=off -U mozilla http://www.example.com <p dir="auto"><sub><span><a href="https://www.commandlinefu.com/commands/view/901/download-an-entire-website" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://www.commandlinefu.com/commands/view/901/download-an-entire-website<br /> <br /> <ul> <li><p dir="auto">DATE Which day would be +90 from now?<br /> <code>date -d "today +90 days" or <code>date -d "+90 days"<br /> <br /> <li><p dir="auto">SED Delete blank lines:<br /> strictly empty <code>sed '/^$/d' or with spaces & tabs <code>sed '/^\s*$/d'<br /> <sub><span><a href="https://stackoverflow.com/questions/16414410/delete-empty-lines-using-sed" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://stackoverflow.com/questions/16414410/delete-empty-lines-using-sed<br /> <br /> <li><p dir="auto">Search MAN pages for a given string: <code>man -k string<br /> <br /> <li><p dir="auto">SETTERM Change (and keep it) VT background and foreground:<br /> <code>$ setterm -store -background blue -foreground cyan <p dir="auto"><br /><br /><br /><br /><br /><br /> <center><h5>please feel free to write comments suggestions and alternatives<br /> <img src="https://images.hive.blog/0x0/https://media.tenor.com/images/51356c29049d292651cb558c6f176430/tenor.gif" alt="untitled.gif" />