find -x "$HOME" -type f -print0 2>/dev/null | while read -d $'\0' filename; do if [[ ${#filename} -lt 85 ]]; then printf -- "\r\e[0K$(printf -- "$filename" | tr -d '\n\r')"; else printf -- "\r\e[0K$(printf -- "$filename" | tr -d '\n\r' | sed -En 's/^(.{40}).*(.{40})$/\1.....\2/p')"; fi done; echo find -x "$HOME" -type f -print0 2>/dev/null | while read -d $'\0' filename; do i=$[i+1] if [[ ${#filename} -lt 85 ]]; then printf -- "\r\e[0K\e[1;32m$i\e[0m $(printf -- "$filename" | tr -d '\n\r')"; else printf -- "\r\e[0K\e[1;32m$i\e[0m $(printf -- "$filename" | tr -d '\n\r' | sed -En 's/^(.{40}).*(.{40})$/\1.....\2/p')"; fi done; echo
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Progress indicator snippet for man find (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» ws - web search from the com... in shell osx mac search bash unix commandline web
» snippet in shell osx mac html bash unix commandline web download convert textutil
» Switching firewall settings ... in shell osx mac bash unix ipfw firewall ruleset switch
» Delete WebKit search fields in shell osx mac bash unix safari webkit
» pdftotext in shell osx mac bash unix pdf text convert
» Tweak your BASH startup files in shell osx mac bash bashrc unix startup profile
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails