{"id":2055,"date":"2015-08-30T22:18:39","date_gmt":"2015-08-30T21:18:39","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?page_id=2055"},"modified":"2025-12-30T13:37:46","modified_gmt":"2025-12-30T18:37:46","slug":"notepad","status":"publish","type":"page","link":"https:\/\/stevepedwards.today\/DebianAdmin\/notepad\/","title":{"rendered":"Notepad"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2055\" class=\"pvc_stats all  \" data-element-id=\"2055\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>RJ45 pins<\/p>\n<ul>\n<li data-start=\"697\" data-end=\"749\">\n<p data-start=\"699\" data-end=\"749\"><strong data-start=\"699\" data-end=\"716\">Pins 1\u20132 = TX<\/strong>, <strong data-start=\"718\" data-end=\"735\">Pins 3\u20136 = RX<\/strong> (10\/100 Mbps)<\/p>\n<\/li>\n<li data-start=\"750\" data-end=\"792\">\n<p data-start=\"752\" data-end=\"792\"><strong data-start=\"752\" data-end=\"772\">Gigabit Ethernet<\/strong> uses <strong data-start=\"778\" data-end=\"792\">all 8 pins<\/strong><\/p>\n<\/li>\n<li data-start=\"793\" data-end=\"851\">\n<p data-start=\"795\" data-end=\"851\"><strong data-start=\"795\" data-end=\"821\">Straight-through cable<\/strong>: same standard on both ends<\/p>\n<\/li>\n<li data-start=\"852\" data-end=\"911\">\n<p data-start=\"854\" data-end=\"911\"><strong data-start=\"854\" data-end=\"873\">Crossover cable<\/strong>: T568A on one end, T568B on the other<\/p>\n<\/li>\n<\/ul>\n<h2 data-start=\"87\" data-end=\"161\"><strong data-start=\"90\" data-end=\"161\">RJ-45 Crimp Order (looking at the plug, clip down, pins facing you)<\/strong><\/h2>\n<h3 data-start=\"163\" data-end=\"190\"><strong data-start=\"167\" data-end=\"190\">T568B (most common)<\/strong><\/h3>\n<ol data-start=\"191\" data-end=\"302\">\n<li data-start=\"191\" data-end=\"208\">\n<p data-start=\"194\" data-end=\"208\">White-Orange<\/p>\n<\/li>\n<li data-start=\"209\" data-end=\"220\">\n<p data-start=\"212\" data-end=\"220\">Orange<\/p>\n<\/li>\n<li data-start=\"221\" data-end=\"237\">\n<p data-start=\"224\" data-end=\"237\">White-Green<\/p>\n<\/li>\n<li data-start=\"238\" data-end=\"247\">\n<p data-start=\"241\" data-end=\"247\">Blue<\/p>\n<\/li>\n<li data-start=\"248\" data-end=\"263\">\n<p data-start=\"251\" data-end=\"263\">White-Blue<\/p>\n<\/li>\n<li data-start=\"264\" data-end=\"274\">\n<p data-start=\"267\" data-end=\"274\">Green<\/p>\n<\/li>\n<li data-start=\"275\" data-end=\"291\">\n<p data-start=\"278\" data-end=\"291\">White-Brown<\/p>\n<\/li>\n<li data-start=\"292\" data-end=\"302\">\n<p data-start=\"295\" data-end=\"302\">Brown<\/p>\n<\/li>\n<\/ol>\n<p data-start=\"304\" data-end=\"404\"><strong data-start=\"304\" data-end=\"317\">Mnemonic:<\/strong><br data-start=\"317\" data-end=\"320\" \/><strong data-start=\"320\" data-end=\"404\">\u201cWhite-Orange, Orange, White-Green, Blue, White-Blue, Green, White-Brown, Brown\u201d<\/strong><\/p>\n<hr data-start=\"406\" data-end=\"409\" \/>\n<h3 data-start=\"411\" data-end=\"424\"><strong data-start=\"415\" data-end=\"424\">T568A<\/strong><\/h3>\n<ol data-start=\"425\" data-end=\"536\">\n<li data-start=\"425\" data-end=\"441\">\n<p data-start=\"428\" data-end=\"441\">White-Green<\/p>\n<\/li>\n<li data-start=\"442\" data-end=\"452\">\n<p data-start=\"445\" data-end=\"452\">Green<\/p>\n<\/li>\n<li data-start=\"453\" data-end=\"470\">\n<p data-start=\"456\" data-end=\"470\">White-Orange<\/p>\n<\/li>\n<li data-start=\"471\" data-end=\"480\">\n<p data-start=\"474\" data-end=\"480\">Blue<\/p>\n<\/li>\n<li data-start=\"481\" data-end=\"496\">\n<p data-start=\"484\" data-end=\"496\">White-Blue<\/p>\n<\/li>\n<li data-start=\"497\" data-end=\"508\">\n<p data-start=\"500\" data-end=\"508\">Orange<\/p>\n<\/li>\n<li data-start=\"509\" data-end=\"525\">\n<p data-start=\"512\" data-end=\"525\">White-Brown<\/p>\n<\/li>\n<li data-start=\"526\" data-end=\"536\">\n<p data-start=\"529\" data-end=\"536\">Brown<\/p>\n<\/li>\n<\/ol>\n<hr data-start=\"538\" data-end=\"541\" \/>\n<h2 data-start=\"543\" data-end=\"568\"><strong data-start=\"546\" data-end=\"568\">Exam Memory Tricks<\/strong><\/h2>\n<h3 data-start=\"570\" data-end=\"588\"><strong data-start=\"574\" data-end=\"588\">TX\/RX Pins<\/strong><\/h3>\n<ul data-start=\"589\" data-end=\"625\">\n<li data-start=\"589\" data-end=\"607\">\n<p data-start=\"591\" data-end=\"607\"><strong data-start=\"591\" data-end=\"607\">1\u20132 transmit<\/strong><\/p>\n<\/li>\n<li data-start=\"608\" data-end=\"625\">\n<p data-start=\"610\" data-end=\"625\"><strong data-start=\"610\" data-end=\"625\">3\u20136 receive<\/strong><\/p>\n<\/li>\n<\/ul>\n<p data-start=\"627\" data-end=\"666\">? Remember: <strong data-start=\"640\" data-end=\"666\">\u201c1-2 talk, 3-6 listen\u201d<\/strong><\/p>\n<p>..............................<\/p>\n<p>Office 21 key activation:<br \/>\nIn PS as Admin - needs \"\" for spaces:<br \/>\ncd \"C:\\Program Files\\Microsoft Office\\Office16\"<br \/>\nor cmd as Admin - no \"\" needed:<br \/>\ncd C:\\Program Files\\Microsoft Office\\Office16<\/p>\n<p>PS C:\\Program Files\\Microsoft Office\\Office16&gt; cscript ospp.vbs \/inpkey:9N72W-QYGR6-JDB4J-W6DYJ-9TRY9<br \/>\nMicrosoft (R) Windows Script Host Version 5.812<br \/>\nCopyright (C) Microsoft Corporation. All rights reserved.<\/p>\n<p>---Processing--------------------------<br \/>\n---------------------------------------<br \/>\n&lt;Product key installation successful&gt;<br \/>\n---------------------------------------<br \/>\n---Exiting-----------------------------<br \/>\nPS C:\\Program Files\\Microsoft Office\\Office16&gt; cscript ospp.vbs \/act<br \/>\nMicrosoft (R) Windows Script Host Version 5.812<br \/>\nCopyright (C) Microsoft Corporation. All rights reserved.<\/p>\n<p>---Processing--------------------------<br \/>\n---------------------------------------<br \/>\nInstalled product key detected - attempting to activate the following product:<br \/>\nSKU ID: 436366de-5579-4f24-96db-3893e4400030<br \/>\nLICENSE NAME: Office 16, Office16OneNoteFreeR_Bypass edition<br \/>\nLICENSE DESCRIPTION: Office 16, RETAIL(Free) channel<br \/>\nLast 5 characters of installed product key: 7CFGB<br \/>\nERROR CODE: 0xC004F017<br \/>\nERROR DESCRIPTION: The Software Licensing Service reported that the license is not installed.<br \/>\n---------------------------------------<br \/>\nInstalled product key detected - attempting to activate the following product:<br \/>\nSKU ID: 8d77de46-78fb-428d-b8c4-c4a078e8912d<br \/>\nLICENSE NAME: Office 21, Office21ProPlus2021MSDNR_Retail edition<br \/>\nLICENSE DESCRIPTION: Office 21, RETAIL channel<br \/>\nLast 5 characters of installed product key: 9TRY9<br \/>\n&lt;Product activation successful&gt;<\/p>\n<p>---Exiting-----------------------------<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/OfficeKeysInfo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11068\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/OfficeKeysInfo.png\" alt=\"\" width=\"681\" height=\"241\" \/><\/a><\/p>\n<hr \/>\n<p>VMs folders cant be deleted:<\/p>\n<div class=\"container\">\n<div id=\"model-response-message-contentr_23361a04932ace3d\" class=\"markdown markdown-main-panel stronger enable-updated-hr-color\" dir=\"ltr\" aria-live=\"off\" aria-busy=\"false\">\n<p data-path-to-node=\"7\">Hyper-V creates a \"Virtual Compute\" session that survives a standard reboot if \"Fast Startup\" is enabled on your laptop. Running the <code data-path-to-node=\"7\" data-index-in-node=\"199\">Stop-Service<\/code> command above bypasses that \"Fast Startup\" hibernation and forces the service to release the folder.<\/p>\n<h3 data-path-to-node=\"8\">? Why you should \"Remove\" before \"Delete\"<\/h3>\n<p data-path-to-node=\"9\">For the future, the cleanest way to do this is:<\/p>\n<ol start=\"1\" data-path-to-node=\"10\">\n<li>\n<p data-path-to-node=\"10,0,0\"><b data-path-to-node=\"10,0,0\" data-index-in-node=\"0\">Right-click<\/b> the VM in Hyper-V Manager and select <b data-path-to-node=\"10,0,0\" data-index-in-node=\"49\">Delete<\/b>. (This doesn't delete the virtual disk, just the \"link\" to the VM).<\/p>\n<\/li>\n<li>\n<p data-path-to-node=\"10,1,0\"><b data-path-to-node=\"10,1,0\" data-index-in-node=\"0\">Then<\/b> delete the folder. If the VM is still listed in the Hyper-V console, it will fight you for the files until it is removed from the list.<\/p>\n<\/li>\n<\/ol>\n<p>BEFORE A BACKUP to ensure no open files left when closing HyperV App:<\/p>\n<p>PS C:\\Windows\\system32&gt; net stop vmms<br \/>\nThe Hyper-V Virtual Machine Management service is stopping.<br \/>\nThe Hyper-V Virtual Machine Management service was stopped successfully.<\/p>\n<p>Using \"Export\" can create messy nested folders and double drives. Just copy the whole VM folder when all is shut down.<\/p>\n<\/div>\n<\/div>\n<hr \/>\n<p>Using DISKPART when WSL2 Linux cannot see the \/mnt drive that has not past through the Win\/Linux file share boundary:<\/p>\n<p>This is a common frustration when a Windows Recovery or Boot tool \"claims\" a drive\u2014it creates a 32GB partition and leaves the rest as unallocated space, often making the drive look like it has \"shrunk\" at the hardware level.<\/p>\n<p>In <strong>WSL2<\/strong>, USB drives do not automatically appear in \/mnt\/ because that directory is for <strong>mounted file systems<\/strong>, not raw hardware. To use cfdisk or gparted, you first have to \"attach\" the physical hardware to the Linux kernel.<\/p>\n<ol>\n<li><strong> Why it isn't in \/mnt\/<\/strong><\/li>\n<\/ol>\n<p>WSL2 is a utility-VM. While it can see your local C: and D: drives via a plan9 network share, it cannot see raw USB devices unless you \"pass them through.\"<\/p>\n<ol start=\"2\">\n<li><strong> The \"Windows Way\" (Easiest Fix)<\/strong><\/li>\n<\/ol>\n<p>Before jumping into Linux tools, try the Windows <strong>DiskPart<\/strong> tool. It is often more powerful than the \"Format\" right-click menu for fixing \"shrunk\" USB sticks.<\/p>\n<ol>\n<li>Open <strong>Command Prompt<\/strong> (Admin).<\/li>\n<li>Type diskpart.<\/li>\n<li>Type list disk (Identify your USB stick\u2014usually Disk 1 or 2).<\/li>\n<li>Type select disk X (Replace X with your USB disk number).<\/li>\n<li><strong>WARNING:<\/strong> Type clean (This wipes the partition table and the \"32GB limit\" entirely).<\/li>\n<li>Type create partition primary.<\/li>\n<li>Type format fs=ntfs quick.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/Diskpart.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10935\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/Diskpart.png\" alt=\"\" width=\"602\" height=\"317\" \/><\/a><\/p>\n<p>...............................<\/p>\n<p>Unblock the WinExp Preview warning;<\/p>\n<p><span style=\"color: #0000ff;\">Get-ChildItem -Path \"C:\\Users\\stevee\\Desktop\\RecentDocs\" -Recurse | Unblock-File<\/span><\/p>\n<p><strong>A \u00a0Reminder Page for Future Study\/Reference Links\u00a0<\/strong><\/p>\n<hr \/>\n<p>Clicking \"Save Changes\" on the Permalinks page (even if you haven't made any changes)<strong> forces WordPress to re-write the <code>.htaccess<\/code> file based on its current <code>siteurl<\/code>, <code>home<\/code>, and permalink structure settings.<\/strong> This should create a clean <code>.htaccess<\/code> file for <code>HPLAPTOP\/NEO<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>WP White screen of death:<\/p>\n<p>\/var\/www\/DebianAdmin\/wp-content is write-able. When finished installing the plugin, change the permissions back to the default: chmod 755 \/var\/www\/DebianAdmin\/wp-content. Permissions are currently 775<\/p>\n<p>OR disable plugins<\/p>\n<p>-------------------------------------------<\/p>\n<p><span style=\"color: #0000ff;\">rm -vr \/var\/www\/DebianAdmin\/wp-content\/cache\/object\/ --interactive=never<\/span><\/p>\n<p>------------------------------<\/p>\n<p>Some VIM in Putty Commands:<\/p>\n<p>For deleting lines:<br \/>\nFor instance, if you wanted to remove lines 4, 5, 6, and 7, you would use the command:<\/p>\n<p>:4,7d<\/p>\n<p>:u undo<\/p>\n<p>For changing bits of code in html files - RISKY!!! Be Careful!<\/p>\n<p>find . -type f -name '*.html' -exec sed -i 's\/page1.html\/CV.html\/g' {}<\/p>\n<p><strong>vim ggVG (delete)<\/strong><\/p>\n<p>Vim Select All in linux window: Check in normal mode with Esc.<\/p>\n<p>Move cursor to top of text. <span style=\"color: #0000ff;\">gg<\/span>.<\/p>\n<p>Go in visual mode; <span style=\"color: #0000ff;\">v<\/span><\/p>\n<p>Highlight all text except last line, <span style=\"color: #0000ff;\">Shift G<\/span><\/p>\n<p>Move cursor to end of last line to include highlighted. <span style=\"color: #0000ff;\">&gt;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">D<\/span> to delete all highlighted text. U to Undo delete.<\/p>\n<p>OR<\/p>\n<p>then you can copy from this (Shift Y = yank) to copy to another doc or\u00a0 (Ctrl-C) text from another doc to then Rclick Paste into window to replace the highlighted text.<\/p>\n<p>--------------------------<br \/>\nso far as I know, there is no means of copying a selected area from the putty window to the Windows clipboard without using the mouse. there is a feature request on the putty site specifically for this functionality.<\/p>\n<p>https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/wishlist\/keyboard-copy.html<\/p>\n<p>the only way to copy information from the putty window to the Windows clipboard with a keyboard shortcut is to use the app system menu \"copy all to clipboard\" (which you can invoke from alt-space, provided you set the \"Window &gt; Behavior &gt; System menu appears on ALT-Space\" option configured in putty.<\/p>\n<p>Pasting from the Windows clipboard into putty can be done with Shift-Insert.<\/p>\n<p>If you need to copy and paste only within the terminal window itself, refer to either the man page for the shell you're using or consider using the unix \"screen\" app ('man screen' for more info), which allows text selection for copy \/ paste within the terminal window (similar to how vi's copy \/ paste works). an excerpt from the man pages:<\/p>\n<p>C-a esc (copy) Enter copy\/scrollback mode.<\/p>\n<p>C-a ] (paste .) Write the contents of the paste buffer to the<br \/>\nstdin queue of the current window.<\/p>\n<p>C-a {<br \/>\nC-a } (history) Copy and paste a previous (command) line.<\/p>\n<p>C-a &gt; (writebuf) Write paste buffer to a file.<\/p>\n<p>C-a &lt; (readbuf) Reads the screen-exchange file into the paste<br \/>\nbuffer.<\/p>\n<p>C-a = (removebuf) Removes the file used by C-a &lt; and C-a &gt;.<\/p>\n<p>---------------------------------------------------------------------------------------------<\/p>\n<p>Win11 repairs: see the Powershell Commands page in top menu.<\/p>\n<p><span style=\"color: #0000ff;\">sfc \/scannow<\/span><\/p>\n<p><span style=\"color: #0000ff;\">DISM \/Online \/Cleanup-Image \/RestoreHealth<\/span><\/p>\n<p>-------------------------------------<\/p>\n<p>for files with annoying \"\u00a0 '\u00a0 \" in filename example. Those files not changed are listed:<\/p>\n<p><span style=\"color: #0000ff;\">touch annoying\u00b4file\u00b4name.txt <\/span><\/p>\n<p><span style=\"color: #0000ff;\">ls annoying\u00b4file\u00b4name.txt<\/span><\/p>\n<p>stevee@hplaptop:~$ <span style=\"color: #0000ff;\">for i in *; do mv \"$i\" \"$(echo \"$i\" | tr -d \"\u00b4\")\"; done;<\/span><br \/>\n<span style=\"color: #ff0000;\">mv: 'PShellCommands.txt' and 'PShellCommands.txt' are the same file<\/span><br \/>\n<span style=\"color: #ff0000;\">mv: 'SSHTestFile.txt' and 'SSHTestFile.txt' are the same file<\/span><br \/>\n<span style=\"color: #ff0000;\">mv: 'ci\u00f3nPalabras.txt' and 'ci\u00f3nPalabras.txt' are the same file<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ls annoyingfilename.txt<\/span><br \/>\nannoyingfilename.txt<\/p>\n<p>-------------<\/p>\n<p>To rename multi files in same dir with same prefix, eg:<\/p>\n<p>from<\/p>\n<p>Asterisk_PBX_Info_html_1234.jpg to 1234.jpg<\/p>\n<p><span style=\"color: #0000ff;\">find -name \"Asterisk_PBX_Info_html_*\" -exec rename 's\/Asterisk_PBX_Info_html_\/\/' {} +;<\/span><\/p>\n<p>-----------<\/p>\n<p><strong>VIM Select all in Putty window on win11 to Linux via SSH:<\/strong><\/p>\n<p><em>For changing bits of code in html files -RISKY!!! Be Careful!<\/em><\/p>\n<p><strong><span style=\"color: #0000ff;\">find . -type f -name '*.html' -exec sed -i 's\/&lt;table&gt;\/&lt;p&gt;\/g' {} +<\/span><\/strong><\/p>\n<p><strong><span style=\"color: #0000ff;\">find . -type f -name '*.html' -exec sed -i 's\/&lt;\\\/table&gt;\/&lt;p&gt;\/g' {} +<\/span><\/strong><\/p>\n<p>The alternative, less usual line end, + , makes Find continue to bulk file search within the current directory \".\"<\/p>\n<p><em>Vim Select All in putty window:<\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">ggVG<\/span> (delete) then you can copy from other doc normally (Ctrl-C) then Rclick into window to replace.<\/em><\/p>\n<p><em>------------<\/em><br \/>\n<em>so far as I know, there is no means of copying a selected area from the putty window to the Windows clipboard without using the mouse. there is a feature request on the putty site specifically for this functionality.<\/em><\/p>\n<p><em>https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/wishlist\/keyboard-copy.html<\/em><\/p>\n<p><em>the only way to copy information from the putty window to the Windows clipboard with a keyboard shortcut is to use the app system menu \"copy all to clipboard\" (which you can invoke from alt-space, provided you set the \"Window &gt; Behavior &gt; System menu appears on ALT-Space\" option configured in putty.<\/em><\/p>\n<p><em>Pasting from the Windows clipboard into putty can be done with Shift-Insert.<\/em><\/p>\n<p><em>If you need to copy and paste only within the terminal window itself, refer to either the man page for the shell you're using or consider using the unix \"screen\" app ('man screen' for more info), which allows text selection for copy \/ paste within the terminal window (similar to how vi's copy \/ paste works). an excerpt from the man pages:<\/em><\/p>\n<p><em>C-a esc (copy) Enter copy\/scrollback mode.<\/em><\/p>\n<p><em>C-a ] (paste .) Write the contents of the paste buffer to the<\/em><br \/>\n<em>stdin queue of the current window.<\/em><\/p>\n<p><em>C-a {<\/em><br \/>\n<em>C-a } (history) Copy and paste a previous (command) line.<\/em><\/p>\n<p><em>C-a &gt; (writebuf) Write paste buffer to a file.<\/em><\/p>\n<p><em>C-a &lt; (readbuf) Reads the screen-exchange file into the paste<\/em><br \/>\n<em>buffer.<\/em><\/p>\n<p><em>C-a = (removebuf) Removes the file used by C-a &lt; and C-a &gt;.<\/em><\/p>\n<p>---------<\/p>\n<p><strong>TO check rsync is deleting what you want before you commit, use grep with a DRY-RUN (-n):<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">rsync \/var\/www\/* \/media\/stevee\/Data\/BackUp\/www\/ --delete-excluded -vahn | grep deleting<\/span><br \/>\n<span style=\"color: #ff0000;\">deleting<\/span> DebianAdmin\/wp-content\/uploads.zip<\/p>\n<p><span style=\"color: #0000ff;\">du -sh \/var\/www\/<\/span><br \/>\n12G \/var\/www\/<\/p>\n<p><strong>To clone one drive (sdc) to another (sdb):<\/strong><\/p>\n<p>stevee@localhost:~$ <span style=\"color: #0000ff;\">sudo dd if=\/dev\/sdc of=\/dev\/sdb conv=sync,noerror status=progress<\/span><\/p>\n<p>For Pis with saved images, use USB Image Writer then\u00a0boot flag in Gparted before it will boot in a new Pi!<\/p>\n<p>Pi with HDMI TV small fonts:<\/p>\n<pre><code><span style=\"color: #0000ff;\">sudo dpkg-reconfigure console-setup<\/span>\r\nchoose; let system decide\/larger font size\r\n------<\/code><\/pre>\n<p><span style=\"color: #0000ff;\">lspci -nn<\/span><\/p>\n<p><span style=\"color: #ff0000;\">07:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF106 [GeForce GTS 450] <strong>[10de:0dc4]<\/strong> (rev a1)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">lspci -d 10de:0dc4 -vvv<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Kernel driver in use: nvidia<\/span><\/p>\n<p><a href=\"https:\/\/www.canon-europe.com\/support\/consumer_products\/products\/printers\/laser\/i-sensys_lbp6230dw.aspx?type=drivers&amp;language=EN&amp;os=Linux%20(64-bit)\">https:\/\/www.canon-europe.com\/support\/consumer_products\/products\/printers\/laser\/i-sensys_lbp6230dw.aspx?type=drivers&amp;language=EN&amp;os=Linux%20(64-bit)<\/a><\/p>\n<p><a href=\"https:\/\/digitcodes.com\/adding-viewport-meta-tag-to-make-your-website-ready-for-mobile\/\">https:\/\/digitcodes.com\/adding-viewport-meta-tag-to-make-your-website-ready-for-mobile\/<\/a><\/p>\n<p>add<\/p>\n<pre><span style=\"color: #ff0000;\"><code>&lt;meta name=viewport content=\"width=device-width, initial-scale=1\"&gt;\r\n<\/code><\/span>to top of WP header.php file<\/pre>\n<p>&nbsp;<\/p>\n<p>Adding another apache server for your PiCams? - copy your current server's index.html to the current PC without shh:<\/p>\n<p><span style=\"color: #0000ff;\">wget dellmint:80; cat index.html | <strong>sudo tee<\/strong> \/var\/www\/index.html<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cat \/var\/www\/index.html<\/span><br \/>\n<span style=\"color: #ff0000;\">&lt;iframe src=\"https:\/\/192.168.1.3:8081\" scrolling=no width=960 height=720 frameborder=no&gt;&lt;\/iframe&gt;....<\/span><\/p>\n<p>If you re-install a PC, your ssh keys complain of threats etc. so remove and re-install them quickly:<\/p>\n<p><span style=\"color: #0000ff;\">ssh-keygen -R<\/span> AMDA8<br \/>\n<span style=\"color: #ff0000;\">\/home\/stevee\/.ssh\/known_hosts updated.<\/span><br \/>\n<span style=\"color: #ff0000;\">Original contents retained as \/home\/stevee\/.ssh\/known_hosts.old<\/span><\/p>\n<p>Get your external ip<\/p>\n<p><span style=\"color: #0000ff;\">dig +short myip.opendns.com @resolver1.opendns.com<\/span><\/p>\n<p>add it to an alias:<\/p>\n<p><span style=\"color: #0000ff;\">alias myip='dig +short myip.opendns.com @resolver1.opendns.com'<\/span><\/p>\n<p>add it permanently to .bash_aliases, and make sure your rsync includes .bash_aliases to other PCs for BU..<\/p>\n<p>The sourceforge random corporate bullshit generator one liner:<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install curl<\/span><\/p>\n<p><span style=\"color: #0000ff;\">curl -s https:\/\/cbsg.sourceforge.net\/cgi-bin\/live | grep -Eo '^&lt;li&gt;.*&lt;\/li&gt;' | sed s,\\&lt;\/\\\\?li\\&gt;,,g | shuf -n 1<\/span><br \/>\n<span style=\"color: #ff0000;\">The point is not merely to deploy an impetus. The point is to integrate promising client needs. The key people proactively promote under-the-radar dotted lines. Controlling should formulate a next-level emotional intelligence as a consequence of a robust cost reduction. The sales manager influences a present-day, profit-maximizing and impactful empowerment, while a fact-based value revolutionises requests \/ solutions.<\/span><\/p>\n<p>Daft Script..<\/p>\n<p><span style=\"color: #0000ff;\">sudo apt-get install sysvbanner\u00a0figlet<\/span><\/p>\n<p><span style=\"color: #0000ff;\">x=4; while expr $x&gt;=2; do x=$(($x-1)); echo $x; echo \"SYSFAULT X0:1 ScreenFault Pending...\" ;sleep 1; done; banner SYSFAULT! | figlet<\/span><\/p>\n<p>good metachar link:<\/p>\n<p><a href=\"https:\/\/www.zytrax.com\/tech\/web\/regex.htm\">https:\/\/www.zytrax.com\/tech\/web\/regex.htm<\/a>,\u00a0<a href=\"https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/regular-expressions\/\">https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/regular-expressions\/<\/a><span style=\"color: #0000ff;\"><br \/>\nat 0125 today<\/span> warning: commands will be executed using \/bin\/sh at&gt; <span style=\"color: #0000ff;\">date<\/span> at&gt; <span style=\"color: #0000ff;\">xmessage -display :0.0 \"You are late\"<\/span> at&gt; &lt;EOT&gt; job 2 at Fri Aug 5 01:25:00 2016 <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/xmsg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3819\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/xmsg.png\" alt=\"xmsg.png\" width=\"116\" height=\"81\" \/><\/a><\/p>\n<p>perl script to show PC name and top load avg in console window, when run:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/perltoploadavg-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3401\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/perltoploadavg-1.png\" alt=\"perltoploadavg.png\" width=\"658\" height=\"97\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">perl bin\/tl &amp;<\/span><\/p>\n<p><center><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/rmBuFPJxGtw?autoplay=1&amp;version=3&amp;loop=1&amp;playlist=rmBuFPJxGtw\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center>This is a good one to compare load avg values between the perl script values above:<\/p>\n<p><span style=\"color: #0000ff;\">python -c 'import os;print os.getloadavg()[0]; print os.getloadavg()[1]; print os.getloadavg()[2];'<\/span><br \/>\n<span style=\"color: #ff0000;\">1.04<\/span><br \/>\n<span style=\"color: #ff0000;\">0.41<\/span><br \/>\n<span style=\"color: #ff0000;\">0.36<\/span><\/p>\n<p>Do this really quick with the up arrows:<\/p>\n<p>stevee@AMDA8 ~ $<span style=\"color: #0000ff;\"> uptime<\/span><br \/>\n18:49:21 up 1:38, 4 users, load average: <span style=\"color: #ff0000;\">2.29, 1.58, 1.21<\/span><br \/>\nstevee@AMDA8 ~ $ <span style=\"color: #0000ff;\">python -c 'import os;print os.getloadavg()[0]; print os.getloadavg()[1]; print os.getloadavg()[2];' | paste -s<\/span><br \/>\n<span style=\"color: #ff0000;\">2.29 1.58 1.21<\/span><br \/>\n--------<\/p>\n<p><span style=\"color: #ff0000;\">!user\/bin\/perl -w<\/span><br \/>\n<span style=\"color: #ff0000;\">use Sys::Hostname;<\/span><br \/>\n<span style=\"color: #ff0000;\">use strict;<\/span><br \/>\n<span style=\"color: #ff0000;\">$|++;<\/span><br \/>\n<span style=\"color: #ff0000;\">my $host = hostname;<\/span><br \/>\n<span style=\"color: #ff0000;\"> chomp $host;<\/span><\/p>\n<p><span style=\"color: #ff0000;\">while(1)<\/span><br \/>\n<span style=\"color: #ff0000;\"> {<\/span><br \/>\n<span style=\"color: #ff0000;\">open(LOAD,\"\/proc\/loadavg\") || die \"Could not open \/proc\/loadavg: $!\\n\";<\/span><\/p>\n<p><span style=\"color: #ff0000;\">my @load=split(\/ \/,&lt;LOAD&gt;);<\/span><br \/>\n<span style=\"color: #ff0000;\">close (LOAD);<\/span><\/p>\n<p><span style=\"color: #ff0000;\">print \"\\033]0;\";<\/span><br \/>\n<span style=\"color: #ff0000;\">print \"$host: $load[0] $load[1] $load[2] at \", scalar(localtime);<\/span><br \/>\n<span style=\"color: #ff0000;\">print \"\\007\";<\/span><\/p>\n<p><span style=\"color: #ff0000;\">sleep 2;<\/span><br \/>\n<span style=\"color: #ff0000;\"> }<\/span><\/p>\n<p>It shows this in the Tab:<\/p>\n<p><strong>hplaptop: 0.02 0.04 0.00 at Fri May 30 23:15:27 2025<\/strong><\/p>\n<p>make a perm alias in your home dir of those below:<\/p>\n<p><span style=\"color: #0000ff;\">alias budellmint='rsync -e ssh --progress \/home\/stevee\/* stevee@dellmint:\/home\/stevee\/ --exclude='.' --exclude=Videos --delete-excluded -vrah'<\/span><\/p>\n<p>by creating, and adding it to what you have already e.g.:<\/p>\n<p><span style=\"color: #0000ff;\">vi .bash_aliases<\/span><\/p>\n<p><span style=\"color: #ff0000;\">alias BIGducks='du -cBG * | sort -nr | head -11'<\/span><\/p>\n<p><span style=\"color: #ff0000;\">alias duse='for i in G M K; do du -hsx * | grep \"[0-9]$i\\b\" | sort -nr; done'<\/span><\/p>\n<p><span style=\"color: #ff0000;\">alias ducks='du -cks * | sort -rn | head -11'<\/span><br \/>\n<span style=\"color: #ff0000;\">alias bulocalhost='rsync -e ssh --progress \/home\/stevee\/* stevee@localhost:\/home\/stevee\/ --exclude='.' --exclude='Videos' -vrah'<\/span><br \/>\n<span style=\"color: #ff0000;\">alias buhpmint='rsync -e ssh --progress \/home\/stevee\/* stevee@hpmint:\/home\/stevee\/ --exclude='.' --exclude='Videos' -vrah'<\/span><br \/>\n<span style=\"color: #ff0000;\">alias budellmint='rsync -e ssh --progress \/home\/stevee\/* stevee@dellmint:\/home\/stevee\/ --exclude='.' --exclude='Videos' -vrah'<\/span><\/p>\n<p>A good addition for du on dirs with very varied sizes:<\/p>\n<p><span style=\"color: #0000ff;\">alias duse='for i in G M K; do du -hsx * | grep \"[0-9]$i\\b\" | sort -nr; done'<\/span><\/p>\n<p>stevee@T3400 ~ $ <span style=\"color: #0000ff;\">duse<\/span><br \/>\n<span style=\"color: #ff0000;\">54G Pictures<\/span><br \/>\n<span style=\"color: #ff0000;\">43G Videos<\/span><br \/>\n<span style=\"color: #ff0000;\">22G VirtualBox VMs<\/span><br \/>\n<span style=\"color: #ff0000;\">21G Downloads<\/span><br \/>\n<span style=\"color: #ff0000;\">5.0G Music<\/span><br \/>\n<span style=\"color: #ff0000;\">56M Documents<\/span><br \/>\n<span style=\"color: #ff0000;\">14M Desktop<\/span><br \/>\n<span style=\"color: #ff0000;\">9.2M ID<\/span><br \/>\n<span style=\"color: #ff0000;\">80K Contacts<\/span><br \/>\n<span style=\"color: #ff0000;\">16K Templates<\/span><br \/>\n<span style=\"color: #ff0000;\">4.0K Public<\/span><br \/>\n<span style=\"color: #ff0000;\">4.0K index.html<\/span><\/p>\n<p><strong>remote rsync\/ssh BUp without pword:<\/strong><\/p>\n<p>This should initially ask you for the password of your account on the remote server. The dot is so your setup files don't get sent also and possibly mess up the remote PC.<\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #ffffff;\">stevee@AMD ~ $<\/span> rsync -e ssh --progress \/home\/stevee\/* stevee@dellmint:\/home\/stevee\/ --exclude='.' --delete-excluded -vahn<\/span><\/p>\n<p><span style=\"color: #ffffff;\"><strong>WITHOUT PASSWORD:<\/strong><\/span><\/p>\n<p><iframe loading=\"lazy\" title=\"Linux remote rsync\" src=\"https:\/\/www.youtube.com\/embed\/CFEjFMfQAFI\" width=\"1351\" height=\"480\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\n2. ssh-keygen generates keys.<\/p>\n<p>Now setup ssh so that it doesn,t ask for password when you perform ssh. Use ssh-keygen on local server to generate public and private keys.<\/p>\n<p>$ <span style=\"color: #0000ff;\">ssh-keygen<\/span><br \/>\nEnter passphrase (empty for no passphrase):<br \/>\nEnter same passphrase again:<br \/>\nNote: When it asks you to enter the passphrase just press enter key, and do not give any password here.<\/p>\n<p>3. ssh-copy-id copies public key to remote host<\/p>\n<p>Use ssh-copy-id, to copy the public key to the remote host.<\/p>\n<p><span style=\"color: #0000ff;\">ssh-copy-id -i ~\/.ssh\/id_rsa.pub\u00a0dellmint<\/span><br \/>\nNote: The above will ask the password for your account on the remote host, and copy the public key automatically to the appropriate location. If ssh-copy-id doesn,t work for you, use the method we discussed earlier to setup ssh password less login.<\/p>\n<p>4. Perform rsync over ssh without password<\/p>\n<p>Now, you should be able to ssh to remote host without entering the password.<\/p>\n<p><span style=\"color: #0000ff;\">ssh\u00a0dellmint<\/span><br \/>\nPerform the rsync again, it should not ask you to enter any password this time.<\/p>\n<p><span style=\"color: #0000ff;\">rsync -e ssh --progress \/home\/stevee\/* stevee@dellmint:\/home\/stevee\/ --exclude='Videos\/' --delete-excluded -vahn<\/span><br \/>\nIf you want to schedule an\u00a0rsync backup job automatically, use crontab to set it up.<\/p>\n<p><span style=\"color: #0000ff;\">crontab -e<\/span><\/p>\n<p><span style=\"color: #ff0000;\">00 16 * * * rsync -e ssh \/1500\/* stevee@dellmint:\/Quadra\/ -a<\/span><\/p>\n<p>Setup an alias for home dir backups - this one leaves files ALREADY on the remote PC intact when budellmint is run:<\/p>\n<p><span style=\"color: #0000ff;\">alias budellmint='rsync -e ssh --progress \/home\/stevee\/* stevee@dellmint:\/home\/stevee\/ --exclude=. -vrah'<\/span><\/p>\n<hr \/>\n<p><span style=\"color: #0000ff;\">tar -czvf<\/span> &lt;archive_name&gt;.tar.gz &lt;files_or_directories_to_compress&gt;<\/p>\n<p>view compressed contents without decomp:<\/p>\n<p><span style=\"color: #0000ff;\">sudo zcat\u00a0 &lt;archive_name&gt;.tar.gz | tar -xO<\/span><\/p>\n<p>Fix no locale UTF8 prob:<\/p>\n<p><span style=\"color: #0000ff;\">sudo locale-gen --purge --no-archive<\/span><\/p>\n<p>Fastest DD speed for the localhost core, 2GB\/s?<\/p>\n<p>stevee@MintMem ~ $ <span style=\"color: #0000ff;\">dd if=\/dev\/zero of=\/dev\/null bs=1M count=10<\/span><br \/>\n<span style=\"color: #ff0000;\">10+0 records in<\/span><br \/>\n<span style=\"color: #ff0000;\">10+0 records out<\/span><br \/>\n<span style=\"color: #ff0000;\">10485760 bytes (10 MB) copied, 0.00518111 s, <strong>2.0 GB\/s<\/strong><\/span><\/p>\n<p><strong>Approx time taken to dd a 160GB SATA disk to a USB2 disk:<\/strong><\/p>\n<p>$ <span style=\"color: #0000ff;\">sudo dd if=\/dev\/sdc of=\/dev\/sdh<\/span><br \/>\n<span style=\"color: #ff0000;\">[sudo] password for stevee: <\/span><br \/>\n<span style=\"color: #ff0000;\">312581808+0 records in<\/span><br \/>\n<span style=\"color: #ff0000;\">312581808+0 records out<\/span><br \/>\n<span style=\"color: #ff0000;\">160041885696 bytes (160 GB) copied, 30962.4 s, 5.2 MB\/s<\/span><\/p>\n<p><strong>30962\/60*60 \u00a0= 8.6 hrs<\/strong><\/p>\n<p>Use imagemagik to reduce multi pics size to 1\/4 orig:<\/p>\n<p><span style=\"color: #0000ff;\">mogrify -resize 25% *.jpg<\/span><\/p>\n<p>Using phpmyadmin to string replace - choose the DB, then SQL tab, then paste:<\/p>\n<p>update wp_posts set post_content = replace(<br \/>\npost_content, '<strong>Ashton<\/strong>',<br \/>\n'<strong>Aston<\/strong>');<\/p>\n<p>Export a mysql DB:<br \/>\n<span style=\"color: #0000ff;\">sudo mysqldump -vu root -p DebianAdmin &gt; \/var\/www\/DA.sql<\/span><\/p>\n<p>Mount a Win8 UEFI locked partition read only:<\/p>\n<p><span style=\"color: #0000ff;\">sudo mount -ro ntfs \/dev\/sda4 mymount\/<\/span><\/p>\n<p><b>Table 9-1. Run level numbers<\/b><\/p>\n<table class=\"CALSTABLE\" border=\"1\">\n<tbody>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">0<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Halt the system.<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">1<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Single-user mode (for special administration).<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">2<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Local Multiuser with Networking but without network service (like NFS)<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">3<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Full Multiuser with Networking<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">4<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Not Used<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">5<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Full Multiuser with Networking and X Windows(GUI)<\/td>\n<\/tr>\n<tr>\n<td align=\"LEFT\" valign=\"TOP\">6<\/td>\n<td align=\"LEFT\" valign=\"TOP\">Reboot.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Broken install? Try:\u00a0<span style=\"color: #0000ff;\">dpkg-reconfigure -a<\/span><\/p>\n<p>Random Number Gen - read <span style=\"color: #0000ff;\">man rand. Format =\u00a0openssl rand [-out file] [-base64 | -hex] seed number e.g:<\/span><\/p>\n<p>stevee@hplaptop:~$ <span style=\"color: #0000ff;\">openssl rand -hex 16<\/span><br \/>\n55d232c74ae52d6c3bac8d8615229956<\/p>\n<p>should give a diff hex number each time<\/p>\n<p><span style=\"color: #0000ff;\">man hexdump<\/span><\/p>\n<p><span style=\"color: #ff0000;\">NUL \\0<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;alert character&gt; \\a<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;backspace&gt; \\b<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;form-feed&gt; \\f<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;newline&gt; \\n<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;carriage return&gt; \\r<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;tab&gt; \\t<\/span><br \/>\n<span style=\"color: #ff0000;\"> &lt;vertical tab&gt; \\v<\/span><\/p>\n<p><span style=\"color: #ffffff;\">update grub in Mint:<\/span><\/p>\n<p><span style=\"color: #0000ff;\">vi \/etc\/default\/grub<\/span><br \/>\n<span style=\"color: #ff0000;\">GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash\"<\/span> - I want to see the loading output, so remove these entries to \"\"<br \/>\nrun:<br \/>\n<span style=\"color: #0000ff;\">update-grub<\/span><br \/>\n<span style=\"color: #ff0000;\">Generating grub configuration file ...<\/span><br \/>\n<span style=\"color: #ff0000;\">Found linux image: \/boot\/vmlinuz-3.16.0-38-generic<\/span><br \/>\n<span style=\"color: #ff0000;\">Found initrd image: \/boot\/initrd.img-3.16.0-38-generic<\/span><br \/>\n<span style=\"color: #ff0000;\">Found memtest86+ image: \/boot\/memtest86+.elf<\/span><br \/>\n<span style=\"color: #ff0000;\">Found memtest86+ image: \/boot\/memtest86+.bin<\/span><br \/>\n<span style=\"color: #ff0000;\"> No volume groups found<\/span><br \/>\n<span style=\"color: #ff0000;\">Found Windows Recovery Environment (loader) on \/dev\/sda5<\/span><br \/>\n<span style=\"color: #ff0000;\">done<\/span><\/p>\n<p>Quick summary of BadPorts Post to strip the columns and dupe ports for <span style=\"color: #0000ff;\">nmap -p<\/span> use, after copy\/paste of the ports from:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/BadPortsBig.txt\">BadPortsBig.txt<\/a><\/p>\n<p><span style=\"color: #0000ff;\">vi BadPortsBig.txt<\/span><br \/>\n<span style=\"color: #0000ff;\">awk '{print $2}' BadPortsBig.txt <\/span><br \/>\n<span style=\"color: #0000ff;\">awk '{print $2}' BadPortsBig.txt &gt; BadPortsOnlyBig.txt <\/span><br \/>\n<span style=\"color: #0000ff;\">uniq BadPortsOnlyBig.txt &gt; BadPortsOnlyBigNoDupes.txt <\/span><br \/>\n<span style=\"color: #0000ff;\">cat BadPortsBig.txt | wc -l<\/span><br \/>\n<span style=\"color: #ff0000;\">869<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cat BadPortsOnlyBigNoDupes.txt | wc -l<\/span><\/p>\n<p><strong><span style=\"color: #ff0000;\">791<\/span><\/strong><\/p>\n<p><span style=\"color: #0000ff;\">tr '\\n' ',' &lt; BadPortsOnlyBigNoDupes.txt<\/span><\/p>\n<p><span style=\"color: #ff0000;\">65422,65432,65530,65535,AMDA8 Documents #<\/span><\/p>\n<p><span style=\"color: #0000ff;\">tr '\\n' ',' &lt; BadPortsOnlyBigNoDupes.txt &gt; BadPortsCommas.txt<\/span><\/p>\n<p>Or just reduced to:<\/p>\n<p><strong><span style=\"color: #0000ff;\">cut -d \" \" -f2 BadPortsBig.txt | uniq | sed ':a;N;$!ba;s\/\\n\/,\/g'<\/span><span style=\"color: #0000ff;\">&gt;<\/span><\/strong><span style=\"color: #00ff00;\"> <a style=\"color: #00ff00;\" href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/BadPortsCommas.txt\">BadPortsCommas.txt<\/a><\/span><\/p>\n<p><span style=\"color: #0000ff;\">nmap 127.0.0.1 -p $(cat BadPortsCommas.txt)<\/span><\/p>\n<p><strong><span style=\"color: #ff0000;\">Not shown: 788 closed ports<\/span><\/strong><br \/>\n<span style=\"color: #ff0000;\">PORT STATE SERVICE<\/span><br \/>\n<span style=\"color: #ff0000;\">22\/tcp open ssh<\/span><br \/>\n<span style=\"color: #ff0000;\">139\/tcp open netbios-ssn<\/span><br \/>\n<span style=\"color: #ff0000;\">445\/tcp open microsoft-ds<\/span><\/p>\n<p>-----------<\/p>\n<p><span style=\"color: #0000ff;\">apt-cache pkgnames | sort &gt; pkgs.txt<\/span><\/p>\n<p><span style=\"color: #0000ff;\">apt-cache pkgnames | wc -l<\/span><br \/>\n82502<\/p>\n<p><span style=\"color: #0000ff;\">whois 131.188.3.223<\/span><\/p>\n<p>Remove duplicate lines with uniq. This leaves the original file unchanged, so you need to pipe the fix to another file e.g.<\/p>\n<p><span style=\"color: #0000ff;\">cat \/aabbcc.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">a<\/span><br \/>\n<span style=\"color: #ff0000;\">a<\/span><br \/>\n<span style=\"color: #ff0000;\">b<\/span><br \/>\n<span style=\"color: #ff0000;\">b<\/span><br \/>\n<span style=\"color: #ff0000;\">c<\/span><br \/>\n<span style=\"color: #ff0000;\">c<\/span><br \/>\n<span style=\"color: #ff0000;\">d<\/span><br \/>\n<span style=\"color: #ff0000;\">d<\/span><\/p>\n<p><span style=\"color: #0000ff;\">uniq \/aabbcc.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">a<\/span><br \/>\n<span style=\"color: #ff0000;\">b<\/span><br \/>\n<span style=\"color: #ff0000;\">c<\/span><br \/>\n<span style=\"color: #ff0000;\">d<\/span><\/p>\n<p><span style=\"color: #0000ff;\">uniq \/aabbcc.txt &gt; \/abcd.txt<\/span><\/p>\n<p>Find words in the Linux dictionary file:<\/p>\n<p><span style=\"color: #0000ff;\">grep '\\&lt;c...h\\&gt;' \/usr\/share\/dict\/words<\/span><br \/>\n<span style=\"color: #ff0000;\">cloth<\/span><br \/>\n<span style=\"color: #ff0000;\">cloth's<\/span><br \/>\n<span style=\"color: #ff0000;\">coach<\/span><br \/>\n<span style=\"color: #ff0000;\">coach's<\/span><br \/>\n<span style=\"color: #ff0000;\">conch<\/span><br \/>\n<span style=\"color: #ff0000;\">conch's<\/span><br \/>\n<span style=\"color: #ff0000;\">couch<\/span><br \/>\n<span style=\"color: #ff0000;\">couch's<\/span><br \/>\n<span style=\"color: #ff0000;\">cough<\/span><br \/>\n<span style=\"color: #ff0000;\">cough's<\/span><br \/>\n<span style=\"color: #ff0000;\">crash<\/span><br \/>\n<span style=\"color: #ff0000;\">crash's<\/span><br \/>\n<span style=\"color: #ff0000;\">crush<\/span><br \/>\n<span style=\"color: #ff0000;\">crush's<\/span><\/p>\n<p><strong>Post on Older Fundamental Admin commands? incl:<\/strong><\/p>\n<p><strong>TIME<\/strong><\/p>\n<p>set your timezone:<\/p>\n<p><span style=\"color: #0000ff;\">sudo dpkg-reconfigure tzdata<\/span><\/p>\n<p><span style=\"color: #0000ff;\">man cal<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cal -j 2015<\/span><\/p>\n<p><span style=\"color: #ff0000;\">August 2015 <\/span><br \/>\n<span style=\"color: #ff0000;\"> Su Mo Tu We Th Fr Sa <\/span><br \/>\n<span style=\"color: #ff0000;\"> 213 <\/span><br \/>\n<span style=\"color: #ff0000;\">214 215 216 217 218 219 220 <\/span><br \/>\n<span style=\"color: #ff0000;\">221 222 223 224 225 226 227 <\/span><br \/>\n<span style=\"color: #ff0000;\">228 229 230 231 232 233 234 <\/span><br \/>\n<span style=\"color: #ff0000;\">235 236 237 238 239 240 241 <\/span><br \/>\n<span style=\"color: #ff0000;\">242 243<\/span><\/p>\n<p><span style=\"color: #0000ff;\">man date<\/span><\/p>\n<p><span style=\"color: #ff0000;\">-s, --set=STRING<\/span><br \/>\n<span style=\"color: #ff0000;\"> set time described by STRING<\/span><\/p>\n<p><span style=\"color: #0000ff;\">date -s=\"Sun, 29 Feb 2016 16:21:42 -0800\" <\/span><br \/>\n<span style=\"color: #ff0000;\">date: invalid date \u02dc=Sun, 29 Feb 2016 16:21:42 -0800<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cal -j 2025<\/span><\/p>\n<p>stevee@hplaptop:~$ <span style=\"color: #0000ff;\">date --date=\"+30 days\"<\/span><br \/>\nMon Jun 30 00:22:29 -05 2025<\/p>\n<p>linux command for a specific date +x days<\/p>\n<p><span style=\"color: #0000ff;\">date --date=<span class=\"hljs-string\">\"YYYY-MM-DD +X days\"<\/span><\/span><\/p>\n<p><strong>Unix Start time<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">date --date='@0'\u00a0<\/span><\/p>\n<p>set month, day, time (hr:mm), year:<\/p>\n<p><span style=\"color: #0000ff;\">date 1103231401<\/span><br \/>\n<span style=\"color: #ff0000;\">Fri Nov 3 23:14:00 GMT 2001<\/span><\/p>\n<p><span style=\"color: #0000ff;\">date 110323141964<\/span><br \/>\n<span style=\"color: #ff0000;\">date: cannot set date: Invalid argument (but works!)<\/span><br \/>\n<span style=\"color: #ff0000;\">Tue Nov 3 23:14:00 GMT 1964<\/span><\/p>\n<p>Another method would be to use either <span style=\"color: #0000ff;\"><b class=\"COMMAND\">hwclock -w<\/b> <span style=\"color: #ffffff;\">or<\/span> <b class=\"COMMAND\">hwclock --systohc<\/b><\/span> to sync the hardware clock to the software clock. If you want to sync your software clock to your hardware clock then you would use <span style=\"color: #0000ff;\"><b class=\"COMMAND\">hwclock -s<\/b> <span style=\"color: #ffffff;\">or<\/span> <b class=\"COMMAND\">hwclock --hwtosys<\/b><\/span>.<\/p>\n<p>date is also used to set the kernel's software clock:<br \/>\n# <span style=\"color: #0000ff;\">date 07142157<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Tue Jul 14 21:57:00 BST 2015<\/span><\/p>\n<p><span style=\"color: #0000ff;\">date -R\u00a0<span style=\"color: #ffffff;\">output date and time in RFC 2822 format<\/span><\/span><br \/>\n<span style=\"color: #ff0000;\">Sun, 30 Aug 2015 22:23:35 +0100<\/span><\/p>\n<p>stevee@hplaptop:~$ <span style=\"color: #0000ff;\">date -R<\/span><br \/>\nSat, 31 May 2025 00:23:50 -0500<\/p>\n<p><span style=\"color: #0000ff;\">ntpdate-debian<\/span><br \/>\n<span style=\"color: #ff0000;\">2 Sep 22:37:16 ntpdate[4559]: adjust time server <strong>91.189.94.4<\/strong> offset -0.007021 sec<\/span><\/p>\n<p><span style=\"color: #0000ff;\">vi \/etc\/default\/ntpdate<\/span><\/p>\n<p><span style=\"color: #ff0000;\">NTPSERVERS=\"ntp.ubuntu.com\"<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ping ntp.ubuntu.com<\/span><br \/>\n<span style=\"color: #ff0000;\">PING ntp.ubuntu.com (<strong>91.189.94.4<\/strong>) 56(84) bytes of data.<\/span><br \/>\n<span style=\"color: #ff0000;\">64 bytes from juniperberry.canonical.com (91.189.94.4): icmp_seq=1 ttl=50 time=28.5 ms<\/span><\/p>\n<p>This will contact an NTP server and determine the time difference but not change your system's time.<\/p>\n<p><span style=\"color: #0000ff;\">ntpdate -d ntp.ubuntu.com<\/span><\/p>\n<p><span style=\"color: #ff0000;\">3 Sep 11:58:00 ntpdate[11913]: adjust time server 91.189.89.199 offset 0.001958 sec<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cat alphas.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">abcdefghijklmnopqrstuvwxyz<\/span><br \/>\n<span style=\"color: #ff0000;\">ABCDEFGHIJKLMNOPQRSTUVWXYZ?<\/span><\/p>\n<p><span style=\"color: #0000ff;\">od -bc alphas.txt<\/span><\/p>\n<p><span style=\"color: #ff0000;\">0000000 141 142 143 144 145 146 <strong>147 150<\/strong> 151 152 153 154 155 156 157 160<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0a \u00a0 \u00a0 b \u00a0 \u00a0 \u00a0c \u00a0 \u00a0 d \u00a0 \u00a0 e \u00a0 \u00a0 f \u00a0 \u00a0 \u00a0g \u00a0 \u00a0 h \u00a0 \u00a0 i \u00a0 \u00a0 \u00a0j \u00a0 \u00a0 \u00a0k \u00a0 \u00a0 l \u00a0 \u00a0 m \u00a0 \u00a0n \u00a0 \u00a0 o \u00a0 \u00a0 p<\/span><br \/>\n<span style=\"color: #ff0000;\">0000020 161 162 163 164 165 166 167 170 171 172 <strong>012<\/strong> 101 102 103 104 105<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0q \u00a0 \u00a0 \u00a0r \u00a0 \u00a0 s \u00a0 \u00a0 \u00a0t \u00a0 \u00a0 \u00a0u \u00a0 \u00a0v \u00a0 \u00a0 w \u00a0 \u00a0 x \u00a0 \u00a0 y \u00a0 \u00a0z \u00a0 \u00a0<strong>\\n<\/strong> \u00a0 \u00a0A \u00a0 \u00a0 B \u00a0 \u00a0C \u00a0 \u00a0D \u00a0 \u00a0E<\/span><br \/>\n<span style=\"color: #ff0000;\">0000040 106 <strong>107 110<\/strong> 111 112 113 114 115 116 <strong>117 120<\/strong> 121 122 123 124 125<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0F \u00a0 \u00a0 G \u00a0 \u00a0H \u00a0 \u00a0 I \u00a0 \u00a0 J \u00a0 \u00a0 \u00a0K \u00a0 \u00a0L \u00a0 \u00a0M \u00a0 N \u00a0 \u00a0O \u00a0 \u00a0 P \u00a0 \u00a0Q \u00a0 \u00a0R \u00a0 \u00a0 S \u00a0 \u00a0 T \u00a0 \u00a0U<\/span><br \/>\n<span style=\"color: #ff0000;\">0000060 126 <strong>127 130<\/strong> 131 132 <strong>077<\/strong> <strong>012<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0V \u00a0 W \u00a0 \u00a0X \u00a0 \u00a0Y \u00a0 \u00a0Z \u00a0 \u00a0 <strong>?<\/strong> \u00a0 \u00a0<strong>\\n<\/strong><\/span><\/p>\n<p><span style=\"color: #ffffff;\">Compare two files byte by byte.<\/span><\/p>\n<p>-l, --verbose<br \/>\noutput byte numbers and differing byte values<\/p>\n<p><span style=\"color: #0000ff;\">cat alphas2.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">abcdefghijklmnopqrstuvwxyz<\/span><br \/>\n<span style=\"color: #ff0000;\">ABCDEFGHIJKLMNOPQRSTUVWXYZ<\/span><br \/>\nMint5630 stevee # <span style=\"color: #0000ff;\">cat alphas.tx<\/span>t<br \/>\n<span style=\"color: #ff0000;\">abcdefghijklmnopqrstuvwxyz<\/span><br \/>\n<span style=\"color: #ff0000;\">ABCDEFGHIJKLMNOPQRSTUVWXYZ?<\/span><br \/>\nMint5630 stevee # <span style=\"color: #0000ff;\">cmp alphas.txt alphas2.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">alphas.txt alphas2.txt differ: byte 54, line 2<\/span><\/p>\n<p><span style=\"color: #0000ff;\">cmp -l alphas.txt alphas2.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">54 77 12 \u00a0(<span style=\"color: #ffffff;\">line no, 2 differing file bytes)<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">od -bc alphas.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0000060 126 127 130 131 132 <strong>077 012<\/strong><\/span><br \/>\n<strong><span style=\"color: #ff0000;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ? \u00a0 \u00a0\\n<\/span><\/strong><\/p>\n<p><span style=\"color: #0000ff;\">diff alphas2.txt alphas.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">2c2<\/span><br \/>\n<span style=\"color: #ff0000;\">&lt; ABCDEFGHIJKLMNOPQRSTUVWXYZ<\/span><br \/>\n<span style=\"color: #ff0000;\">---<\/span><br \/>\n<span style=\"color: #ff0000;\">&gt; ABCDEFGHIJKLMNOPQRSTUVWXYZ?<\/span><\/p>\n<p>Running Processes<\/p>\n<p><span style=\"color: #0000ff;\">ps ua<\/span><br \/>\nUSER PID <span style=\"color: #ff0000;\">%CPU<\/span> %MEM VSZ RSS TTY STAT START TIME COMMAND<br \/>\nroot 785 0.0 0.0 15824 2048 tty4 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nroot 789 0.0 0.0 15824 2004 tty5 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nroot 804 0.0 0.0 15824 1996 tty2 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nroot 805 0.0 0.0 15824 1992 tty3 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nroot 808 0.0 0.0 15824 1992 tty6 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nroot 1214 1.3 0.9 378880 64704 tty8 Ssl+ 12:41 8:14 \/usr\/bin\/X :<br \/>\nroot 1821 0.0 0.0 15824 2072 tty1 Ss+ 12:41 0:00 \/sbin\/getty<br \/>\nstevee 3160 0.0 0.0 22636 5144 pts\/0 Ss 12:48 0:00 bash<br \/>\nroot 3177 0.0 0.0 89148 4324 pts\/0 S 12:48 0:00 su -<br \/>\nroot 3185 0.0 0.0 23108 5824 pts\/0 S 12:48 0:01 -su<br \/>\nstevee 4126 0.0 0.0 22728 5328 pts\/3 Ss 14:00 0:00 -bash<br \/>\nroot 4144 0.0 0.0 89152 4388 pts\/3 S 14:00 0:00 su root<br \/>\nroot 4151 0.0 0.0 22736 5464 pts\/3 S+ 14:00 0:00 bash<br \/>\n<em><span style=\"color: #ff0000;\">root 4341 <strong>69.3<\/strong> 1.1 101908 76808 pts\/0 R+ 14:34 357:16 rsync \/Store<\/span><\/em><br \/>\n<em><span style=\"color: #ffffff;\">root 4342 0.0 0.4 73576 32240 pts\/0 S+ 14:34 0:03 rsync \/Store<\/span><\/em><br \/>\n<em><span style=\"color: #ffffff;\"> root 4343 12.8 2.9 263768 195304 pts\/0 S+ 14:34 66:12 rsync \/Store<\/span><\/em><br \/>\nstevee 5859 0.0 0.0 22728 5332 pts\/4 Ss 21:34 0:00 -bash<br \/>\nstevee 6210 0.0 0.0 18460 2552 pts\/4 R+ 23:09 0:00 ps ua<\/p>\n<p><span style=\"color: #0000ff;\">ps auf <span style=\"color: #ffffff;\">(tree) or <span style=\"color: #0000ff;\">pstree<\/span><\/span><\/span><br \/>\nUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND<br \/>\nstevee 7373 0.0 0.1 7048 4676 pts\/3 Ss 13:05 0:00 bash<br \/>\nroot 7392 0.0 0.1 8404 4076 pts\/3 S 13:05 0:00 \\_ su root<br \/>\nroot 7400 0.0 0.1 7140 4876 pts\/3 S+ 13:05 0:00 \\_ bash<br \/>\nstevee 3245 0.0 0.1 6992 4676 pts\/1 Ss 11:29 0:00 bash<br \/>\nroot 3304 0.0 0.1 8404 4060 pts\/1 S 11:29 0:00 \\_ su root<br \/>\nroot 3317 0.0 0.1 7192 4992 pts\/1 S 11:29 0:00 \\_ bash<br \/>\nroot 7874 0.0 0.0 5232 2368 pts\/1 R+ 13:45 0:00 \\_ ps auf<br \/>\nroot 1491 2.1 1.3 186784 43224 tty8 Ssl+ 11:28 2:59 \/usr\/bin\/X :0 -audit 0 -auth \/va<\/p>\n<p><a href=\"https:\/\/debian-handbook.info\/browse\/stable\/sect.task-scheduling-cron-atd.html\" target=\"_blank\" rel=\"noopener\">https:\/\/debian-handbook.info\/browse\/stable\/sect.task-scheduling-cron-atd.html<\/a><\/p>\n<p><span style=\"color: #0000ff;\">man mkfs<\/span> - build a Linux filesystem<\/p>\n<p>password checks:<\/p>\n<p><span style=\"color: #ff0000;\">cracklib-check - Check passwords using libcrack2,\u00a0FascistCheck<\/span><\/p>\n<p><span style=\"color: #0000ff;\">echo \"MyPassword\" | cracklib-check<\/span><br \/>\nMyPassword: it is based on a dictionary word<\/p>\n<p><strong>Redirection<\/strong><\/p>\n<p>The file descriptors for stdin, <em>stdout<\/em>, and stderr are 0, 1, and 2, respectively.<\/p>\n<p><a href=\"https:\/\/www.tldp.org\/LDP\/abs\/html\/io-redirection.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.tldp.org\/LDP\/abs\/html\/io-redirection.html<\/a><\/p>\n<p><a href=\"https:\/\/wiki.bash-hackers.org\/howto\/redirection_tutorial\" target=\"_blank\" rel=\"noopener\">https:\/\/wiki.bash-hackers.org\/howto\/redirection_tutorial<\/a><\/p>\n<p><strong>SETUID PERM - non exe and exe<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">locate passwd | grep \/usr\/bin<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/gpasswd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/grub-mkpasswd-pbkdf2<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/lppasswd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/passwd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/smbpasswd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/tightvncpasswd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/vino-passwd<\/span><br \/>\n<span style=\"color: #ff0000;\">\/usr\/bin\/vncpasswd<\/span><\/p>\n<p><strong>PASSWORDS<\/strong><\/p>\n<p><a href=\"https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack\" target=\"_blank\" rel=\"noopener\">https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack<\/a><\/p>\n<p><em><a href=\"https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack\" target=\"_blank\" rel=\"noopener\">Preventing compromise of user accounts relies on all accounts having passwords that are not easily guessable.<\/a><\/em><br \/>\n<em> <a href=\"https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack\" target=\"_blank\" rel=\"noopener\">Attackers on the Internet regularly use automated tools, often called \"ssh scanners,\" which attempt to log in to systems using a wide selection of commonly known usernames and a set of passwords, mostly dictionary words. The scanner additionally tries using the username as the password (e.g. username \"john\" and password \"john\"). SDSC systems networks undergo these attacks daily; choosing a weak password for an account will result in a compromise of that account.<\/a><\/em><br \/>\n<em> <a href=\"https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack\" target=\"_blank\" rel=\"noopener\">Additionally, when an attacker gains access to a system, he\/she will often steal encrypted passwords from the \/etc\/shadow file and attempt to determine passwords to accounts by running a program such as [Crack, which takes a large dictionary of words, encrypts them, and matches the result against what is stored in the shadow file. Crack also tries common variations of words, such as substituting 1 (one) for l (ell), $ for S, etc.<\/a><\/em><br \/>\n<em> <a href=\"https:\/\/security.sdsc.edu\/index.php\/Configuring_PAM_with_libcrack\" target=\"_blank\" rel=\"noopener\">Many security tutorials suggest rules for password creation, such as including punctuation, etc. But fending of ssh scans and crack attempts can be fended off simply by preventing users from choosing passwords from the dictionary that attackers use.<\/a><\/em><\/p>\n<p><span style=\"color: #ff0000;\">The legacy UNIX\u00a0System encryption method is based on the NBS DES algorithm. More<\/span><br \/>\n<span style=\"color: #ff0000;\"> recent methods are now recommended (see ENCRYPT_METHOD).<\/span><\/p>\n<p><em>Use the crypt(3) function. On glibc, the method used depends on the salt, if it starts with:<\/em><\/p>\n<p><em>$1$: it uses MD5.<\/em><br \/>\n<em>$5$: it uses SHA-256.<\/em><br \/>\n<span style=\"color: #0000ff;\"><em>$6$: it uses SHA-512. (See stevee below)<\/em><\/span><br \/>\n<em>$2a$: it uses blowfish, not supported everywhere.<\/em><br \/>\n<em>Otherwise it uses DES.<\/em><\/p>\n<p>In \/etc\/shadow:<\/p>\n<p><span style=\"color: #ff0000;\">stevee:<span style=\"color: #0000ff;\">$6$<\/span><\/span><\/p>\n<p>Or from the length of Field2 itself:<\/p>\n<pre><span style=\"color: #ff0000;\">stevee:<\/span><span style=\"color: #0000ff;\">$6$<\/span><span style=\"color: #ff0000;\">wDWXf**********8***************vdP***6yZTErv52xP.nO*************b.<span style=\"color: #0000ff;\">:<\/span><\/span>\r\nMD5     | 22 characters\r\nSHA-256 | 43 characters\r\nSHA-512 | 86 characters\r\n\r\nThe characters in \"<i>salt<\/i>\" and \"<i>encrypted<\/i>\" are drawn from the set [<b>a-zA-Z0-9.\/<\/b>]. In the MD5 and SHA implementations the entire <i>key<\/i> is significant (instead of only the first 8 bytes in DES).<\/pre>\n<p><span style=\"color: #ff0000;\">NAME<\/span><br \/>\n<span style=\"color: #ff0000;\"> des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED - fast<\/span><br \/>\n<span style=\"color: #ff0000;\"> DES encryption<\/span><\/p>\n<p><em><strong><span style=\"color: #ff0000;\">passwd uses PAM to authenticate users and to change their passwords.<\/span><\/strong><\/em><\/p>\n<p>Most Unicies (and Linux is no exception) primarily use a one-way encryption algorithm, called DES (Data Encryption Standard) to encrypt your passwords. This encrypted password is then stored in (typically) \/etc\/passwd (or less commonly) \/etc\/shadow. When you attempt to login, the password you type in is encrypted again and compared with the entry in the file that stores your passwords. If they match, it must be the same password, and you are allowed access. Although DES is a two-way encryption algorithm (you can code and then decode a message, given the right keys), the variant that most Unixes use is one-way. This means that it should not be possible to reverse the encryption to get the password from the contents of \/etc\/passwd (or \/etc\/shadow).<\/p>\n<p>Brute force attacks, such as \"Crack\" or \"John the Ripper\" (see section Section 6.9) can often guess passwords unless your password is sufficiently random. PAM modules (see below) allow you to use a different encryption routine with your passwords (MD5 or the like). You can use Crack to your advantage, as well. Consider periodically running Crack against your own password database, to find insecure passwords. Then contact the offending user, and instruct him to change his password.<\/p>\n<p><span style=\"color: #0000ff;\">ls -als \/usr\/bin\/passwd<\/span><br \/>\n<span style=\"color: #ff0000;\">48 -rw<span style=\"color: #0000ff;\">s<\/span>r-xr-x 1 root root 45420 Jul 15 20:31 \/usr\/bin\/passwd<\/span><\/p>\n<p>passwd is owned by root, yet users can use it to change their pword - why..? Setbits!<\/p>\n<p>Regardless of who runs this program, run it as the user who <b>owns<\/b> it, not the user that executes it.<\/p>\n<p><a href=\"https:\/\/danielmiessler.com\/study\/unixlinux_permissions\/\" target=\"_blank\" rel=\"noopener\">https:\/\/danielmiessler.com\/study\/unixlinux_permissions\/<\/a><\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">touch \/script.txt<\/span><br \/>\nMint5630 stevee # <span style=\"color: #0000ff;\">chmod 4644 \/script.txt<\/span><br \/>\nMint5630 stevee # <span style=\"color: #0000ff;\">ls -als \/script.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0 -rw<span style=\"color: #0000ff;\">S<\/span>r--r-- 1 root root 0 Aug 31 09:56 \/script.txt<\/span><\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">chmod 2644 \/script.txt <\/span><br \/>\n<span style=\"color: #0000ff;\">Mint5630 stevee # ls -als \/script.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0 -rw-r-<span style=\"color: #0000ff;\">S<\/span>r-- 1 root root 0 Aug 31 09:56 \/script.txt<\/span><\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">ls -als \/script.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0 -rw-r-<span style=\"color: #0000ff;\">s<\/span>r-- 1 root root 0 Aug 31 09:56 \/script.txt<\/span><\/p>\n<p><strong>Sticky Bit - non exe and exe<\/strong><\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">ls -als \/script.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0 -rw-r--r-<span style=\"color: #0000ff;\">T<\/span> 1 root root 0 Aug 31 09:56 \/script.txt<\/span><\/p>\n<p>Mint5630 stevee #<span style=\"color: #0000ff;\"> ls -als \/script.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0 -rw-r--r-<span style=\"color: #0000ff;\">t<\/span> 1 root root 0 Aug 31 09:56 \/script.txt<\/span><\/p>\n<p><strong>Password Files Fields Meanings<\/strong><\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">sudo cat \/etc\/shadow | grep stevee<\/span><br \/>\n[sudo] password for stevee:<br \/>\n<span style=\"color: #0000ff;\">stevee<\/span>:<span style=\"color: #ff0000;\">$6$****etc:<\/span><span style=\"color: #0000ff;\">16661<\/span>:<span style=\"color: #ff0000;\">0:<\/span><span style=\"color: #0000ff;\">99999<\/span>:<span style=\"color: #ff0000;\">7:<\/span>:<span style=\"color: #ff0000;\">:<\/span><\/p>\n<p>note; same username, same pw on 2 diff PCs renders different hashes:<\/p>\n<p><span style=\"color: #ff0000;\">stevee:$6$PWcj1...<\/span><\/p>\n<p><span style=\"color: #ff0000;\">stevee:$6$drgCB...<\/span><\/p>\n<p>F1 Name; F2 pw enc (98 chars); F3 days since Jan1, 1970 (16661 days = 45 yrs); F4 min days pw retained (0 = can never change); F5 max days until pword must change (99999 days = 273\u00a0yrs); F6 days before expiry warning (7); F7 (null); F8 null); F9 unused<\/p>\n<p>In Ubuntu\/Mint, the enc method (used with a SALT) is found in:<\/p>\n<p><span style=\"color: #0000ff;\">vi \/etc\/pam.d\/common-password<\/span><\/p>\n<p><span style=\"color: #ff0000;\"># here are the per-package modules (the \"Primary\" block)<\/span><br \/>\n<span style=\"color: #ff0000;\">password [success=1 default=ignore] pam_unix.so obscure <strong>sha512<\/strong><\/span><\/p>\n<p>The passwd file shows <strong>x - enc not held here<\/strong> - the <strong>home dir<\/strong> and the <strong>shell<\/strong> the user will boot into:<\/p>\n<p><span style=\"color: #ff0000;\">stevee:<strong>x<\/strong>:1000:1000:stevee,,,:\/<strong>home\/stevee<\/strong>:<strong>\/bin\/bash<\/strong><\/span><\/p>\n<p><strong>Counting Line Bytes (-c) or Chars (-m), removing columns and chars<\/strong><\/p>\n<p>Take the \/etc\/shadow field 2 as an example, put in \/file.txt where vi shows the visible characters as numbering 98:<\/p>\n<pre><span style=\"color: #0000ff;\">$6$<\/span><span style=\"color: #ff0000;\">wDWXf**********8***************vdP***6yZTErv52xP.nO*************b.<\/span><\/pre>\n<p>1,98 All<\/p>\n<p>but, with a hidden newline char (\\n = 012) shown by:<\/p>\n<p><span style=\"color: #0000ff;\">wc -m &lt; \/file.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">99<\/span><\/p>\n<p>shown by od:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2097\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od.png\" alt=\"od.png\" width=\"637\" height=\"299\" \/><\/a><\/p>\n<p>or better, just -c; ASCII character or backslash escape:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2099\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od2.png\" alt=\"od2.png\" width=\"634\" height=\"178\" \/><\/a><\/p>\n<p>This shows the passwd hash letters in a grid of 16 x 6 + 3 = 99.<\/p>\n<p>Using awk to show all but column $1:<\/p>\n<p><span style=\"color: #0000ff;\">od -c \/file.txt | awk '{print $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16}'<\/span><br \/>\n<span style=\"color: #ff0000;\">$ 6 $ w D W X f U S 0 $ H m W<\/span><br \/>\n<span style=\"color: #ff0000;\">E x 1 s v v d P a B 5 O 9 E O<\/span><br \/>\n<span style=\"color: #ff0000;\">j i g 9 8 S r f x t a 0 9 R 5<\/span><br \/>\n<span style=\"color: #ff0000;\">Z L r c P I I r b Q 5 j B t b<\/span><br \/>\n<span style=\"color: #ff0000;\">k D S M R 6 y Z T E r v 5 2 x<\/span><br \/>\n<span style=\"color: #ff0000;\">. n O L k C F z S t D X c l O<\/span><br \/>\n<span style=\"color: #ff0000;\">b . \\n<\/span><\/p>\n<p>or more elegantly;<\/p>\n<p><span style=\"color: #0000ff;\">od -c \/file.txt | awk '{$1=\"\"; print $0}'<\/span><br \/>\n<span style=\"color: #ff0000;\">$ 6 $ w D W X f U S 0 $ H m W z<\/span><br \/>\n<span style=\"color: #ff0000;\"> E x 1 s v v d P a B 5 O 9 E O z<\/span><br \/>\n<span style=\"color: #ff0000;\"> j i g 9 8 S r f x t a 0 9 R 5 X<\/span><br \/>\n<span style=\"color: #ff0000;\"> Z L r c P I I r b Q 5 j B t b m<\/span><br \/>\n<span style=\"color: #ff0000;\"> k D S M R 6 y Z T E r v 5 2 x P<\/span><br \/>\n<span style=\"color: #ff0000;\"> . n O L k C F z S t D X c l O j<\/span><br \/>\n<span style=\"color: #ff0000;\"> b . \\n<\/span><\/p>\n<p>Remove the final \\n:<\/p>\n<p><span style=\"color: #0000ff;\"> od -c \/file.txt | awk '{$1=\"\"; print $0}' | sed 's\/\\\\n\/\/'<\/span><br \/>\n<span style=\"color: #ff0000;\">$ 6 $ w D W X f U S 0 $ H m W z<\/span><br \/>\n<span style=\"color: #ff0000;\"> E x 1 s v v d P a B 5 O 9 E O z<\/span><br \/>\n<span style=\"color: #ff0000;\"> j i g 9 8 S r f x t a 0 9 R 5 X<\/span><br \/>\n<span style=\"color: #ff0000;\"> Z L r c P I I r b Q 5 j B t b m<\/span><br \/>\n<span style=\"color: #ff0000;\"> k D S M R 6 y Z T E r v 5 2 x P<\/span><br \/>\n<span style=\"color: #ff0000;\"> . n O L k C F z S t D X c l O j<\/span><br \/>\n<span style=\"color: #ff0000;\"> b .<\/span><\/p>\n<p>or even more elegantly using cut, where each char is counted from left, so from char 11 onwards:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/cut1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2108\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/cut1.png\" alt=\"cut1.png\" width=\"638\" height=\"173\" \/><\/a><\/p>\n<p>You can still pipe that into sed to remove the final \\n also.<\/p>\n<p><span style=\"color: #0000ff;\">od -c \/file2.txt | cut -c 11- | sed 's\/\\\\n\/\/'<\/span><br \/>\n<span style=\"color: #ff0000;\">$ 6 $ w D W X f U S 0 $ H m W z<\/span><br \/>\n<span style=\"color: #ff0000;\">E x 1 s v v d P a B 5 O 9 E O z<\/span><br \/>\n<span style=\"color: #ff0000;\">j i g 9 8 S r f x t a 0 9 R 5 X<\/span><br \/>\n<span style=\"color: #ff0000;\">Z L r c P I I r b Q 5 j B t b m<\/span><br \/>\n<span style=\"color: #ff0000;\">k D S M R 6 y Z T E r v 5 2 x P<\/span><br \/>\n<span style=\"color: #ff0000;\">. n O L k C F z S t D X c l O j<\/span><br \/>\n<span style=\"color: #ff0000;\">b .<\/span><\/p>\n<p>Note that vi counts only visible characters - 98 total, but wc -m will count the \\n:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/vi1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2104\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/vi1.png\" alt=\"vi1.png\" width=\"636\" height=\"125\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\">cat \/file2.txt | wc -m<\/span><br \/>\n<span style=\"color: #ff0000;\">99<\/span><\/p>\n<p>BEWARE! You can get some bizarre and unexpected results in streamed combos:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2105\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/od3.png\" alt=\"od3.png\" width=\"636\" height=\"293\" \/><\/a><\/p>\n<p>212 chars counted but only 98 shown, which is the original correct amount on one line plus \\n!<\/p>\n<p><span style=\"color: #0000ff;\">cat \/file2.txt | wc -m<\/span><br \/>\n<span style=\"color: #ff0000;\">99<\/span><\/p>\n<p>To finish, use paste to glue back the 2 sections again with a delimiter of choice, once the 2 files are prepared e.g.:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/paste1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2110\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2015\/08\/paste1.png\" alt=\"paste1.png\" width=\"638\" height=\"207\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>FSCK mounted FS<\/p>\n<p><span style=\"color: #0000ff;\">fsck -n<\/span><br \/>\n<span style=\"color: #ff0000;\">fsck from util-linux 2.20.1<\/span><br \/>\n<span style=\"color: #ff0000;\">e2fsck 1.42.9 (4-Feb-2014)<\/span><br \/>\n<span style=\"color: #ff0000;\">Warning! \/dev\/sda1 is mounted.<\/span><br \/>\n<span style=\"color: #ff0000;\">Warning: skipping journal recovery because doing a read-only filesystem check.<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1: clean, 196568\/2313808 files, 5561526\/9243392 blocks<\/span><\/p>\n<pre class=\"SCREEN\"><span style=\"color: #0000ff;\">badblocks -vv \/dev\/sda1<\/span>\r\n<span style=\"color: #ff0000;\">Checking blocks 0 to 36973567<\/span>\r\n<span style=\"color: #ff0000;\">Checking for bad blocks (read-only test): 0.00% done, 0:00 elapsed. (0\/0\/0 errdone <\/span>\r\n<span style=\"color: #ff0000;\">Pass completed, 0 bad blocks found. (0\/0\/0 errors)<\/span><\/pre>\n<p><strong>BACKUPS - old, redundant, but interesting<\/strong><\/p>\n<p>Mint5630 Downloads # <span style=\"color: #0000ff;\">ls | cpio -ov &gt; \/dev\/sdb<\/span><br \/>\n<span style=\"color: #ff0000;\">20140122143951478.rar<\/span><br \/>\n<span style=\"color: #ff0000;\">20150206145713250.rar<\/span><br \/>\n<span style=\"color: #ff0000;\">H264_WEBUI<\/span><br \/>\n<span style=\"color: #ff0000;\">lexmark-inkjet-08-driver-1.0-1.i386.deb.sh<\/span><br \/>\n<span style=\"color: #ff0000;\">lexmark-inkjet-08-driver-1.0-1.i386.deb.sh.zip<\/span><br \/>\n<span style=\"color: #ff0000;\">openprinting-ppds-postscript-lexmark_20140829-1lsb3.2_all.deb<\/span><br \/>\n<span style=\"color: #ff0000;\">P2PCam<\/span><br \/>\n<span style=\"color: #ff0000;\">166115 blocks<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ls | cpio -ivm &lt; \/dev\/sdb<\/span><br \/>\n<span style=\"color: #ff0000;\">cpio: 20140122143951478.rar not created: newer or same age version exists<\/span><br \/>\n<span style=\"color: #ff0000;\">20140122143951478.rar<\/span><br \/>\n<span style=\"color: #ff0000;\">cpio: 20150206145713250.rar not created: newer or same age version exists<\/span><br \/>\n<span style=\"color: #ff0000;\">20150206145713250.rar<\/span><br \/>\n<span style=\"color: #ff0000;\">H264_WEBUI<\/span><br \/>\n<span style=\"color: #ff0000;\">cpio: lexmark-inkjet-08-driver-1.0-1.i386.deb.sh not created: newer or same age version exists<\/span><br \/>\n<span style=\"color: #ff0000;\">lexmark-inkjet-08-driver-1.0-1.i386.deb.sh<\/span><br \/>\n<span style=\"color: #ff0000;\">cpio: lexmark-inkjet-08-driver-1.0-1.i386.deb.sh.zip not created: newer or same age version exists<\/span><br \/>\n<span style=\"color: #ff0000;\">lexmark-inkjet-08-driver-1.0-1.i386.deb.sh.zip<\/span><br \/>\n<span style=\"color: #ff0000;\">cpio: openprinting-ppds-postscript-lexmark_20140829-1lsb3.2_all.deb not created: newer or same age version exists<\/span><br \/>\n<span style=\"color: #ff0000;\">openprinting-ppds-postscript-lexmark_20140829-1lsb3.2_all.deb<\/span><br \/>\n<span style=\"color: #ff0000;\">P2PCam<\/span><br \/>\n<span style=\"color: #ff0000;\">166115 blocks<\/span><\/p>\n<p>System HW info:<\/p>\n<p><span style=\"color: #0000ff;\">sudo lshw -html &gt; hardware_info.html<\/span><\/p>\n<p><span style=\"color: #0000ff;\">firefox hardware_info.html<\/span><\/p>\n<p>FIND<\/p>\n<p><span style=\"color: #0000ff;\">find \/ -size +3G\u00a02&gt; \/dev\/null<\/span><\/p>\n<p>\/tftpboot\/Win7\/Win7_64.iso<\/p>\n<p><span style=\"color: #0000ff;\">find \/ -name *.iso<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/tftpboot\/Win7\/Win7_64.iso<\/span><br \/>\n<span style=\"color: #ff0000;\">\/tftpboot\/Win7\/KB3AIK_EN.iso<\/span><\/p>\n<p>$ <span style=\"color: #0000ff;\">sudo find \/ -name *.img -size +3G\u00a02&gt; \/dev\/null<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/PiImgs\/Pinoir.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/PiImgs\/2015-05-05-raspbian-wheezy.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/PiImgs\/Piblanc.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/stevee\/StevesITStuff\/PiImg\/Pinoir.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/stevee\/StevesITStuff\/PiImg\/2015-05-05-raspbian-wheezy.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/500GB\/stevee\/Downloads\/AMDA8Stellar.img<\/span><br \/>\n<span style=\"color: #ff0000;\">\/home\/stevee\/Downloads\/AMDA8Stellar.img<\/span><\/p>\n<p>Modification time (days)<\/p>\n<p><span style=\"color: #0000ff;\">find . -mtime +365<\/span><\/p>\n<p><span style=\"color: #ff0000;\">.\/Downloads\/MyEye800.jpg<\/span><\/p>\n<p><span style=\"color: #0000ff;\">find \/Share\/ \\( -user stevee -a -size +2G \\)<\/span><br \/>\n<span style=\"color: #ff0000;\">\/Share\/Stevee\/StevesITStuff\/Drivers\/AcerDrivers\/AcerRecISO1.iso<\/span><br \/>\n<span style=\"color: #ff0000;\">\/Share\/Stevee\/StevesITStuff\/Win7Home\/Win7Home.iso<\/span><\/p>\n<p>There must be a space between the last curly and the backslash!<\/p>\n<p><span style=\"color: #0000ff;\">find \/home\/ \\( -mtime +65 -a -atime +65 \\) -exec cp -vt \/Share\/ <strong>{} +;<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">\u02dc\/home\/stevee\/Downloads\/Vigor2860FWare\/STD\/v2860_3783.rst, -&gt; \u02dc\/Share\/v2860_3783.rst,<\/span><br \/>\n<span style=\"color: #ff0000;\">\u02dc\/home\/stevee\/Downloads\/Vigor2860FWare\/STD\/v2860_3783.all, -&gt; \u02dc\/Share\/v2860_3783.all,<\/span><\/p>\n<p>Backup a day's files:<\/p>\n<p><span style=\"color: #0000ff;\">find \/home\/stevee\/Documents\/ -mtime +1 -exec cp -vt \/Share\/ {} +;<\/span><br \/>\n<span style=\"color: #ff0000;\">cp: omitting directory \u02dc\/home\/stevee\/Documents\/,<\/span><br \/>\n<span style=\"color: #ff0000;\">\u02dc\/home\/stevee\/Documents\/Webcam.odt, -&gt; \u02dc\/Share\/Webcam.odt,<\/span><br \/>\n<span style=\"color: #ff0000;\">\u02dc\/home\/stevee\/Documents\/Fix Double Minus Sign Problem in WordPress in Theme Functions php.odt, -&gt; \u02dc\/Share\/Fix Double Minus Sign Problem in WordPress in Theme Functions php.odt,<\/span><br \/>\n<span style=\"color: #ff0000;\">\u02dc\/home\/stevee\/Documents\/Vista 32 bit PC: Alex, -&gt; \u02dc\/Share\/Vista 32 bit PC: Alex,<\/span><\/p>\n<p>TAR - tape archive - note the tar file name\/creation comes before the files to go in it!<\/p>\n<p><span style=\"color: #ff0000;\">Examples:<\/span><br \/>\n<span style=\"color: #ff0000;\"> tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.<\/span><br \/>\n<span style=\"color: #ff0000;\"> tar -tvf archive.tar # List all files in archive.tar verbosely.<\/span><br \/>\n<span style=\"color: #ff0000;\"> tar -xvf archive.tar # Extract all files from archive.tar.<\/span><\/p>\n<p>-d; creates dirs<\/p>\n<p>-c; write header info in ASCII<\/p>\n<p>-r; interactive renaming<\/p>\n<p>-t; list archive files<\/p>\n<p>-u; overwrite newer file with older<\/p>\n<p>-v; verbose<\/p>\n<p>-m; retain mod time<\/p>\n<p>-f <em>exp;<\/em> copy all except those in <em>exp<\/em><\/p>\n<p>If you use full\u00a0<strong>relative pathnames\u00a0<\/strong>then files are restored back where they came from, but tar may not read \"*\" for replacement though it used them for backup. Tar copies subdirs by default, and creates them on restore if req.<\/p>\n<p>Create a tar in \/Share of all files in pwd<\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #ffffff;\">MintServer Documents #<\/span> tar cvf \/Share\/Docs.tar *<\/span><br \/>\n<span style=\"color: #ff0000;\">Fix Double Minus Sign Problem in WordPress in Theme Functions php.odt<\/span><br \/>\n<span style=\"color: #ff0000;\">Vista 32 bit PC: Alex<\/span><br \/>\n<span style=\"color: #ff0000;\">Webcam.odt<\/span><\/p>\n<p>List contents<\/p>\n<p>MintServer Documents #<span style=\"color: #0000ff;\"> tar tvf \/Share\/Docs.tar<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- stevee\/stevee 405667840 2015-09-01 16:19 Fix Double Minus Sign Problem in WordPress in Theme Functions php.odt<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- stevee\/stevee 1198 2015-08-28 10:21 Vista 32 bit PC: Alex<\/span><br \/>\n<span style=\"color: #ff0000;\">-rw-r--r-- stevee\/stevee 24579 2015-08-07 14:45 Webcam.odt<\/span><\/p>\n<p>Restore<\/p>\n<p><span style=\"color: #0000ff;\">tar -xvf \/Share\/Docs.tar<\/span><br \/>\n<span style=\"color: #ff0000;\">Fix Double Minus Sign Problem in WordPress in Theme Functions php.odt<\/span><br \/>\n<span style=\"color: #ff0000;\">Vista 32 bit PC: Alex<\/span><br \/>\n<span style=\"color: #ff0000;\">Webcam.odt<\/span><\/p>\n<p>TAR options - <strong>check against current man page<\/strong><\/p>\n<p>-r; appends to archive end<\/p>\n<p>-x; extract recursively<\/p>\n<p>-t; list files, long format<\/p>\n<p>- u; as -r but for newer files than present<\/p>\n<p>-c; new archive an a device<\/p>\n<p>-w; confirm<\/p>\n<p>-m; change mod time to extract time<\/p>\n<p>-o; change owner to extractor<\/p>\n<p>***********<\/p>\n<p>Ytalk<\/p>\n<p><span style=\"color: #0000ff;\">apt-get install ytalk<\/span><\/p>\n<p><span style=\"color: #ff0000;\">= YTalk version 3.3.0 =-<\/span><br \/>\n<span style=\"color: #ff0000;\">oi<\/span><br \/>\n<span style=\"color: #ff0000;\">jrgkojdfg;'pskdfg<\/span><br \/>\n<span style=\"color: #ff0000;\">p;oskdfg<\/span><\/p>\n<p><span style=\"color: #ff0000;\">= stevee@192.168.1.24 =-<\/span><br \/>\n<span style=\"color: #ff0000;\">i<\/span><br \/>\n<span style=\"color: #ff0000;\">kjhf<\/span><\/p>\n<p><strong>AT command and redirecting the result (as AT\u00a0sends a mail by default - no MTA installed, no msg)<\/strong><\/p>\n<p><em>\"The user will be mailed <strong>standard error and standard output<\/strong> from his commands, if any...by sendmail\"<\/em><\/p>\n<p><code class=\"command\">at now + <em class=\"replaceable\">number<\/em> <em class=\"replaceable\">period<\/em><\/code>. The <em class=\"replaceable\">period<\/em> can be <code class=\"literal\">minutes<\/code>, <code class=\"literal\">hours<\/code>, <code class=\"literal\">days<\/code>, or <code class=\"literal\">weeks<\/code>. The <em class=\"replaceable\">number<\/em> simply indicates the number of said units that must elapse before execution of the command.<\/p>\n<pre class=\"screen\"><strong class=\"userinput\"><code>at 09:00 27.07.14 &lt;&lt;END<\/code><\/strong> <code class=\"computeroutput\">&gt; <\/code><strong class=\"userinput\"><code>echo \"Don't forget to wish a Happy Birthday to Rapha\u00c3\u00abl!\" \\<\/code><\/strong> <code class=\"computeroutput\">&gt; <\/code><strong class=\"userinput\"><code>  | mail lolando@debian.org<\/code><\/strong> <code class=\"computeroutput\">&gt; <\/code><strong class=\"userinput\"><code>END<\/code><\/strong><\/pre>\n<p><span style=\"color: #0000ff;\">at 1445 &lt;&lt; END<\/span><br \/>\n<span style=\"color: #ff0000;\">&gt; date &gt; \/dev\/pts\/5<\/span><br \/>\n<span style=\"color: #ff0000;\">&gt; END<\/span><br \/>\n<span style=\"color: #ff0000;\">warning: commands will be executed using \/bin\/sh<\/span><br \/>\n<span style=\"color: #ff0000;\">job 13 at Wed Sep 2 14:45:00 2015<\/span><\/p>\n<p>The output shows secs after 14:45 in term pts\/5:<\/p>\n<p><span style=\"color: #ff0000;\">Wed Sep 2 14:45:00 BST 2015<\/span><\/p>\n<p>Show the At queue:<\/p>\n<p><span style=\"color: #0000ff;\">atq<\/span><\/p>\n<p><span style=\"color: #ff0000;\">9 Thu Sep 3 14:34:00 2015 a root<\/span><\/p>\n<p>delete job 9:<\/p>\n<p><span style=\"color: #0000ff;\">atrm 9<\/span><\/p>\n<p>or queue:<\/p>\n<p><span style=\"color: #0000ff;\">at -l<\/span><br \/>\n<span style=\"color: #ff0000;\">17 Wed Sep 2 15:18:00 2015 a root<\/span><\/p>\n<p><span style=\"color: #0000ff;\">at 1458 &lt;&lt; END<\/span><br \/>\n<span style=\"color: #0000ff;\"> &gt; rsync Downloads\/Vigor2860FWare \/media\/stevee\/A8B8-81C3\/ --progress -vrazhn &gt; \/dev\/pts\/5<\/span><br \/>\n<span style=\"color: #0000ff;\"> &gt; END<\/span><\/p>\n<p><span style=\"color: #ff0000;\">warning: commands will be executed using \/bin\/sh<\/span><br \/>\n<span style=\"color: #ff0000;\">job 14 at Wed Sep 2 14:58:00 2015<\/span><\/p>\n<p>In pts\/5:<\/p>\n<p><span style=\"color: #ff0000;\">\/dev\/pts\/5<\/span><br \/>\n<span style=\"color: #ff0000;\">MintServer stevee # sending incremental file list<\/span><br \/>\n<span style=\"color: #ff0000;\">Vigor2860FWare\/<\/span><br \/>\n<span style=\"color: #ff0000;\">Vigor2860FWare\/STD\/<\/span><br \/>\n<span style=\"color: #ff0000;\">Vigor2860FWare\/STD\/v2860_3783.all<\/span><br \/>\n<span style=\"color: #ff0000;\">Vigor2860FWare\/STD\/v2860_3783.rst<\/span><\/p>\n<p><span style=\"color: #ff0000;\">sent 159 bytes received 30 bytes 378.00 bytes\/sec<\/span><br \/>\n<span style=\"color: #ff0000;\">total size is 26.09M speedup is 138,032.87 (DRY RUN)<\/span><\/p>\n<p><strong>Generate PC Hardware Report<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">lshw -html &gt; \/hwreport.html<\/span><\/p>\n<table class=\"node\" summary=\"attributes of minte4264\" width=\"100%\">\n<thead>\n<tr>\n<td class=\"first\">id:<\/td>\n<td class=\"second\">\n<div class=\"id\">minte4264<\/div>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"first\">description:<\/td>\n<td class=\"second\">Desktop Computer<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">product:<\/td>\n<td class=\"second\">E4264 ()<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">vendor:<\/td>\n<td class=\"second\">Gateway<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">version:<\/td>\n<td class=\"second\">500<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">serial:<\/td>\n<td class=\"second\">GCJ7950000093<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">width:<\/td>\n<td class=\"second\">64 bits<\/td>\n<\/tr>\n<tr>\n<td class=\"first\">capabilities:<\/td>\n<td class=\"second\"><dfn title=\"SMBIOS version 2.4\">smbios-2.4<\/dfn> <dfn title=\"DMI version 2.4\">dmi-2.4<\/dfn> <dfn title=\"32-bit processes\">vsyscall32<\/dfn><\/td>\n<\/tr>\n<tr>\n<td class=\"first\">configuration:<\/td>\n<td class=\"second\">\n<table summary=\"configuration of minte4264\">\n<tbody>\n<tr>\n<td class=\"sub-first\">boot<\/td>\n<td>=<\/td>\n<td>normal<\/td>\n<\/tr>\n<tr>\n<td class=\"sub-first\">chassis<\/td>\n<td>=<\/td>\n<td>desktop<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>STAT command - formatted file info output - from Will Shot's site<\/strong><\/p>\n<p><strong><a href=\"https:\/\/lcorg.blogspot.co.uk\/search\/label\/Commands\" target=\"_blank\" rel=\"noopener\">https:\/\/lcorg.blogspot.co.uk\/search\/label\/Commands<\/a><\/strong><\/p>\n<p>Using the -f option, we can examine file systems as well:<\/p>\n<p>bshotts@twin7:~$ <b>stat -f \/<\/b><br \/>\nFile: \"\/\"<br \/>\nID: 9e38fe0b56e0096d Namelen: 255\u00a0\u00a0\u00a0\u00a0 Type: ext2\/ext3<br \/>\nBlock size: 4096\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Fundamental block size: 4096<br \/>\nBlocks: Total: 18429754\u00a0\u00a0 Free: 10441154\u00a0\u00a0 Available: 9504962<br \/>\nInodes: Total: 4685824\u00a0\u00a0\u00a0 Free: 4401092<\/p>\n<p>Clearly stat delivers the goods when it comes to file information, but what about that output format?\u00a0 I can't think of anything worse to deal with from a script writer's point-of-view (actually I can, but let's not go there!).<\/p>\n<p>Here's where the beauty of stat starts to shine through.\u00a0 The output is completely customizable.\u00a0 stat supports printf-like format specifiers.\u00a0 Here is an example extracting just the name, size, and octal file permissions:<\/p>\n<p>bshotts@twin7:~$ <b>stat -c \"%n\u00a0 %s\u00a0 %a\" .bashrc<\/b><br \/>\n.bashrc\u00a0 3800\u00a0 644<\/p>\n<p>The -c option provides basic formatting capabilities, while the --printf option can do even more by interpreting backslash escape sequences:<\/p>\n<p>bshotts@twin7:~$ <b>stat --printf=\"%n\\t%s\\t%a\\n\" .bashrc<\/b><br \/>\n.bashrc\u00a0\u00a0 \u00a03800\u00a0\u00a0 \u00a0644<\/p>\n<p>Using this format, we can produce tab-delimited output, perfect for processing by the cut command.\u00a0 Each of the fields in the stat output is available for formatting.\u00a0 See the stat man page for the complete list.<\/p>\n<p><strong>DUMP\/RESTORE - see cpio also<\/strong><\/p>\n<p>a level 0 dump is a full filesys backup - e.g. first used before later incremental BUs<\/p>\n<p><span style=\"color: #0000ff;\">blkid<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1: UUID=\"436a55a9-f610-45f6-866d-a72bfe10ff74\" TYPE=\"ext4\" <\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda5: UUID=\"185ec76d-f2a0-49fd-a3b5-bd5ee859a18b\" TYPE=\"swap\" <\/span><br \/>\n<span style=\"color: #ff0000;\"><strong>\/dev\/sdb1<\/strong>: UUID=\"5C90-48F8\" TYPE=\"vfat\"<\/span><\/p>\n<p>Mint5630 Pictures # <span style=\"color: #0000ff;\">dump -0 -f \/dev\/sdb1 \/home\/stevee\/Pictures<\/span><br \/>\n<span style=\"color: #ff0000;\">DUMP: Date of this level 0 dump: Wed Sep 2 23:33:21 2015<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Dumping \/dev\/sda1 (\/ (dir home\/stevee\/Pictures)) to \/dev\/sdb1<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Label: none<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Writing 10 Kilobyte records<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: mapping (Pass I) [regular files]<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: mapping (Pass II) [directories]<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: estimated 897 blocks.<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Volume 1 started with block 1 at: Wed Sep 2 23:33:21 2015<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: dumping (Pass III) [directories]<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: dumping (Pass IV) [regular files]<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Closing \/dev\/sdb1<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Volume 1 completed at: Wed Sep 2 23:33:23 2015<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Volume 1 880 blocks (0.86MB)<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Volume 1 took 0:00:02<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Volume 1 transfer rate: 440 kB\/s<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: 880 blocks (0.86MB) on 1 volume(s)<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: finished in 1 seconds, throughput 880 kBytes\/sec<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Date of this level 0 dump: Wed Sep 2 23:33:21 2015<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Date this dump completed: Wed Sep 2 23:33:23 2015<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: Average transfer rate: 440 kB\/s<\/span><br \/>\n<span style=\"color: #ff0000;\"> DUMP: DUMP IS DONE<\/span><\/p>\n<p>RESTORE is a prob with pen drive...<\/p>\n<p><span style=\"color: #0000ff;\">fdisk -l \/dev\/sda<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Disk \/dev\/sda: 40.0 GB, 40007761920 bytes<\/span><br \/>\n<span style=\"color: #ff0000;\">255 heads, 63 sectors\/track, 4864 cylinders, total 78140160 sectors<\/span><br \/>\n<span style=\"color: #ff0000;\">Units = sectors of 1 * 512 = 512 bytes<\/span><br \/>\n<span style=\"color: #ff0000;\">Sector size (logical\/physical): 512 bytes \/ 512 bytes<\/span><br \/>\n<span style=\"color: #ff0000;\">I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<\/span><br \/>\n<span style=\"color: #ff0000;\">Disk identifier: 0x000d2419<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Device Boot Start End Blocks Id System<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1 * 2048 73949183 36973568 83 Linux<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda2 73951230 78139391 2094081 5 Extended<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda5 73951232 78139391 2094080 82 Linux swap \/ Solaris<\/span><\/p>\n<p><span style=\"color: #0000ff;\">fdisk \/dev\/sda<\/span><\/p>\n<p>Command (m for help): m<br \/>\nCommand action<br \/>\na toggle a bootable flag<br \/>\nb edit bsd disklabel<br \/>\nc toggle the DOS compatibility flag<br \/>\nd delete a partition<br \/>\nl list known partition types<br \/>\nm print this menu<br \/>\nn add a new partition<br \/>\no create a new empty DOS partition table<br \/>\np print the partition table<br \/>\nq quit without saving changes<br \/>\ns create a new empty Sun disklabel<br \/>\nt change a partition's system id<br \/>\nu change display\/entry units<br \/>\nv verify the partition table<br \/>\nw write table to disk and exit<br \/>\nx extra functionality (experts only)<\/p>\n<p>Command (m for help): l<\/p>\n<p>0 Empty 24 NEC DOS 81 Minix \/ old Lin bf Solaris<br \/>\n1 FAT12 27 Hidden NTFS Win 82 Linux swap \/ So c1 DRDOS\/sec (FAT-<br \/>\n2 XENIX root 39 Plan 9 83 Linux c4 DRDOS\/sec (FAT-<br \/>\n3 XENIX usr 3c PartitionMagic 84 OS\/2 hidden C: c6 DRDOS\/sec (FAT-<br \/>\n4 FAT16 &lt;32M 40 Venix 80286 85 Linux extended c7 Syrinx<br \/>\n5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data<br \/>\n6 FAT16 42 SFS 87 NTFS volume set db CP\/M \/ CTOS \/ .<br \/>\n7 HPFS\/NTFS\/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility<br \/>\n8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt<br \/>\n9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access<br \/>\na OS\/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R\/O<br \/>\nb W95 FAT32 51 OnTrack DM6 Aux 9f BSD\/OS e4 SpeedStor<br \/>\nc W95 FAT32 (LBA) 52 CP\/M a0 IBM Thinkpad hi eb BeOS fs<br \/>\ne W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT<br \/>\nf W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12\/16\/<br \/>\n10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux\/PA-RISC b<br \/>\n11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor<br \/>\n12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor<br \/>\n14 Hidden FAT16 &lt;3 61 SpeedStor ab Darwin boot f2 DOS secondary<br \/>\n16 Hidden FAT16 63 GNU HURD or Sys af HFS \/ HFS+ fb VMware VMFS<br \/>\n17 Hidden HPFS\/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE<br \/>\n18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux RAID auto<br \/>\n1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep<br \/>\n1c Hidden W95 FAT3 75 PC\/IX be Solaris boot ff BBT<br \/>\n1e Hidden W95 FAT1 80 Old Minix<\/p>\n<p><strong><em>\"Modern Linux filesystem keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can't be stored in consecutive sectors. Some filesystems, like ext3, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system.\"<\/em><\/strong><\/p>\n<p><strong>HOWEVER...good to know how...<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">apropos defrag<\/span><br \/>\n<span style=\"color: #ff0000;\">e4defrag (8) - online defragmenter for ext4 filesystem<\/span><\/p>\n<p><span style=\"color: #0000ff;\">man\u00a0e4defrag<\/span><\/p>\n<p><span style=\"color: #ff0000;\">e4defrag - online defragmenter for ext4 filesystem<\/span><\/p>\n<p><span style=\"color: #ff0000;\">SYNOPSIS<\/span><br \/>\n<span style=\"color: #ff0000;\"> e4defrag [ -c ] [ -v ] target ...<\/span><\/p>\n<p><span style=\"color: #ff0000;\">DESCRIPTION<\/span><br \/>\n<span style=\"color: #ff0000;\"> e4defrag reduces fragmentation of extent based file. The file tar<\/span><br \/>\n<span style=\"color: #ff0000;\"> geted by e4defrag is created on ext4 filesystem made with \"-O<\/span><br \/>\n<span style=\"color: #ff0000;\"> extent\" option (see mke2fs(8)). The targeted file gets more con<\/span><br \/>\n<span style=\"color: #ff0000;\"> tiguous blocks and improves the file access speed.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">target is a regular file, a directory, or a device that is mounted<\/span><br \/>\n<span style=\"color: #ff0000;\"> as ext4 filesystem. If target is a directory, e4defrag reduces<\/span><br \/>\n<span style=\"color: #ff0000;\"> fragmentation of all files in it. If target is a device, e4defrag<\/span><br \/>\n<span style=\"color: #ff0000;\"> gets the mount point of it and reduces fragmentation of all files in<\/span><br \/>\n<span style=\"color: #ff0000;\"> this mount point.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">OPTIONS<\/span><br \/>\n<strong><span style=\"color: #ff0000;\"> -c Get a current fragmentation count and an ideal fragmentation<\/span><\/strong><br \/>\n<span style=\"color: #ff0000;\"><strong> count, and calculate fragmentation score based on them.<\/strong> By<\/span><br \/>\n<span style=\"color: #ff0000;\"> seeing this score, we can determine whether we should execute<\/span><br \/>\n<span style=\"color: #ff0000;\"> e4defrag to target. When used with -v option, the current<\/span><br \/>\n<span style=\"color: #ff0000;\"> fragmentation count and the ideal fragmentation count are<\/span><br \/>\n<span style=\"color: #ff0000;\"> printed for each file.<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Also this option outputs the average data size in one extent.<\/span><br \/>\n<span style=\"color: #ff0000;\"> If you see it, you'll find the file has ideal extents or not.<\/span><br \/>\n<strong><span style=\"color: #ff0000;\"> Note that the maximum extent size is 131072KB in ext4<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\"> filesystem (if block size is 4KB).<\/span><\/strong><\/p>\n<p><span style=\"color: #ff0000;\">If this option is specified, target is never defragmented.<\/span><\/p>\n<p><strong><span style=\"color: #ff0000;\">-v Print error messages and the fragmentation count before and<\/span><\/strong><br \/>\n<strong><span style=\"color: #ff0000;\"> after defrag for each file.<\/span><\/strong><\/p>\n<p><span style=\"color: #0000ff;\">e4defrag \/home\/stevee\/<\/span><\/p>\n<p><span style=\"color: #ff0000;\">[4344\/4344]\/home\/stevee\/.macromedia\/Flash_Player\/#SharedObjects\/ZN9NYCUV\/sysimages.tq.cn\/js\/vip\/shareObject.swf\/info.sol: 100% [ OK ]<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Success: [ 3405\/4344 ]<\/span><br \/>\n<span style=\"color: #ff0000;\"> Failure: [ 939\/4344 ]<\/span><\/p>\n<p><span style=\"color: #0000ff;\">e4defrag -vc \/dev\/sda1<\/span><\/p>\n<p><span style=\"color: #ff0000;\">[197662\/197662] \"\/MINTSERVER\"<\/span><br \/>\n<span style=\"color: #ff0000;\"> File is not regular file<\/span><\/p>\n<p><span style=\"color: #ff0000;\">&lt;Fragmented files&gt; now\/best size\/ext<\/span><br \/>\n<span style=\"color: #ff0000;\">1. \/var\/log\/ConsoleKit\/history.1 11\/1 4 KB<\/span><br \/>\n<span style=\"color: #ff0000;\">2. \/var\/log\/pm-powersave.log.1 6\/1 4 KB<\/span><br \/>\n<span style=\"color: #ff0000;\">3. \/var\/log\/auth.log.1 6\/1 4 KB<\/span><br \/>\n<span style=\"color: #ff0000;\">4. \/var\/log\/ConsoleKit\/history 5\/1 4 KB<\/span><br \/>\n<span style=\"color: #ff0000;\">5. \/var\/log\/wtmp.1 17\/1 4 KB<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Total\/best extents 139974\/139341<\/span><br \/>\n<span style=\"color: #ff0000;\"> Average size per extent 149 KB<\/span><br \/>\n<span style=\"color: #ff0000;\"> Fragmentation score 0<\/span><br \/>\n<span style=\"color: #ff0000;\"> [0-30 no problem: 31-55 a little bit fragmented: 56- needs defrag]<\/span><br \/>\n<span style=\"color: #ff0000;\"> This device (\/dev\/sda1) does not need defragmentation.<\/span><br \/>\n<span style=\"color: #ff0000;\"> Done.<\/span><\/p>\n<p>DISK USE<\/p>\n<p><span style=\"color: #0000ff;\">du -sh \/<\/span><br \/>\n<span style=\"color: #ff0000;\">du: cannot access \u02dc\/run\/user\/1000\/gvfs,: Permission denied<\/span><br \/>\n<span style=\"color: #ff0000;\">du: cannot access \u02dc\/proc\/7954\/task\/7954\/fd\/4,: No such file or directory<\/span><br \/>\n<span style=\"color: #ff0000;\">du: cannot access \u02dc\/proc\/7954\/task\/7954\/fdinfo\/4,: No such file or directory<\/span><br \/>\n<span style=\"color: #ff0000;\">du: cannot access \u02dc\/proc\/7954\/fd\/4,: No such file or directory<\/span><br \/>\n<span style=\"color: #ff0000;\">du: cannot access \u02dc\/proc\/7954\/fdinfo\/4,: No such file or directory<\/span><br \/>\n<strong><span style=\"color: #ff0000;\">93G \/<\/span><\/strong><\/p>\n<p><span style=\"color: #0000ff;\">du -sh \/home\/stevee\/<\/span><br \/>\n<span style=\"color: #ff0000;\">13G \/home\/stevee\/<\/span><\/p>\n<p><span style=\"color: #0000ff;\"> df -h<\/span><br \/>\n<span style=\"color: #ff0000;\">Filesystem Size <strong>Used<\/strong> Avail Use% Mounted on<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1 146G <strong>93G<\/strong> 46G 68% \/<\/span><br \/>\n<span style=\"color: #ff0000;\">none 4.0K 0 4.0K 0% \/sys\/fs\/cgroup<\/span><br \/>\n<span style=\"color: #ff0000;\">udev 1.5G 8.0K 1.5G 1% \/dev<\/span><br \/>\n<span style=\"color: #ff0000;\">tmpfs 304M 2.3M 302M 1% \/run<\/span><br \/>\n<span style=\"color: #ff0000;\">none 5.0M 0 5.0M 0% \/run\/lock<\/span><br \/>\n<span style=\"color: #ff0000;\">none 1.5G 59M 1.5G 4% \/run\/shm<\/span><br \/>\n<span style=\"color: #ff0000;\">none 100M 32K 100M 1% \/run\/user<\/span><\/p>\n<p><span style=\"color: #0000ff;\">df -h \/<\/span><br \/>\n<span style=\"color: #ff0000;\">Filesystem Size <strong>Used<\/strong> Avail Use% Mounted on<\/span><br \/>\n<span style=\"color: #ff0000;\">\/dev\/sda1 146G <strong>93G<\/strong> 46G 68% \/<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">w<\/span><br \/>\n<span style=\"color: #ff0000;\">17:10:57 up 8:11, 3 users, load average: 2.14, 2.22, 2.44<\/span><br \/>\n<span style=\"color: #ff0000;\">USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT<\/span><br \/>\n<span style=\"color: #ff0000;\">stevee tty8 :0 09:01 8:11m 20:46 0.79s cinnamon-session --session cinnamon2d<\/span><br \/>\n<span style=\"color: #ff0000;\">stevee pts\/1 :0 09:12 1:02m 2:50 8:45 gnome-terminal<\/span><\/p>\n<p>Keys info:<\/p>\n<p><span style=\"color: #0000ff;\">dpkg-reconfigure keyboard-configuration<\/span><br \/>\n<span style=\"color: #0000ff;\">vi \/etc\/default\/keyboard<\/span><br \/>\n<span style=\"color: #0000ff;\">apt-get install console-data<\/span><br \/>\n<span style=\"color: #0000ff;\">dpkg-reconfigure console-data<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2055\" class=\"pvc_stats all  \" data-element-id=\"2055\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>RJ45 pins Pins 1\u20132 = TX, Pins 3\u20136 = RX (10\/100 Mbps) Gigabit Ethernet uses all 8 pins Straight-through cable: same standard on both ends Crossover cable: T568A on one end, T568B on the other RJ-45 Crimp Order (looking at the plug, clip down, pins facing you) T568B (most common) White-Orange Orange White-Green Blue White-Blue <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/notepad\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Notepad<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2055","page","type-page","status-publish","hentry"],"a3_pvc":{"activated":true,"total_views":27,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/2055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=2055"}],"version-history":[{"count":40,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/2055\/revisions"}],"predecessor-version":[{"id":11113,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/pages\/2055\/revisions\/11113"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=2055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}