Skip to content

Instantly share code, notes, and snippets.

@gitgrimbo
Last active February 16, 2019 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gitgrimbo/444e457a308f532b4f80f7737935a8f1 to your computer and use it in GitHub Desktop.
Save gitgrimbo/444e457a308f532b4f80f7737935a8f1 to your computer and use it in GitHub Desktop.
Linux Commands
Click to see more

find

Sort the files in a directory by size, recursive, show the top 50.

find . -type f -printf "%s\t%p\n" | sort -nr | head -50

wget

Download a site. Restrict names of downloaded files to Windows-compatible names. (GNU Wget 1.19.4 built on linux-gnu.)

wget -m -p -E -k --restrict-file-names=windows www.thesite.com

-m,  --mirror                    shortcut for -N -r -l inf --no-remove-listing
-p,  --page-requisites           get all images, etc. needed to display HTML page
-E,  --adjust-extension          save HTML/CSS documents with proper extensions
-k,  --convert-links             make links in downloaded HTML or CSS point to
                                     local files
     --restrict-file-names=OS    restrict chars in file names to ones OS allows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment