Skip to content

Instantly share code, notes, and snippets.

@vr-greycube
Last active August 8, 2023 03:08
Show Gist options
  • Save vr-greycube/61f80dd792da0f8c2a5038018bd0ebb7 to your computer and use it in GitHub Desktop.
Save vr-greycube/61f80dd792da0f8c2a5038018bd0ebb7 to your computer and use it in GitHub Desktop.
ubuntu terminal survival guide

# sorted by modified

find . -type f -not -path "*/__pycache__/*" -printf "%TY-%Tm-%Td %TT %p\n" | sort -n

# sorted by modified reverse

find . -type f -not -path "*/__pycache__/*" -printf "%TY-%Tm-%Td %TT %p\n" | sort -nr

# with sub dirs

ls -ltR

# list of file names into txt file e.g. to create bundle.js

find . --include=\*.js -print > all_files.txt



grep -nriw searchtext

grep Horn searchtext

find . -name "*.js" -exec grep -nHo the_string {} \;

for i in *'%3A'*; do mv "$i" `echo $i | sed -e 's/%3A//g'`; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment