User Tools

Site Tools


files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
files [2021/11/17 22:24] – created - external edit 127.0.0.1files [2024/01/06 07:11] (current) jhagstrand
Line 1: Line 1:
- 
 ====== Files ====== ====== Files ======
  
Line 42: Line 41:
   $ find . -name "*.js" -exec java -jar compiler.jar --js {} --js_output_file new{} \;   $ find . -name "*.js" -exec java -jar compiler.jar --js {} --js_output_file new{} \;
   $ find . -name "*.jpg" -exec convert {} -resize 1920x1080 ../assets_youtube/{} \;    $ find . -name "*.jpg" -exec convert {} -resize 1920x1080 ../assets_youtube/{} \; 
 +
 +find unique list of file types
 +  $ find ../ -type f | awk -F. '!a[$NF]++{print $NF}'
 +
 +find and execute command on files across files
 +  $ find /media/seagate/media/ -name Thumbs.db -exec rm {} \; # delete files across folders
 +  $ find ../ -type f \( -name "*.jpg" -o name "*.JPG" \) -exec rm {} \;
 +  $ find ../ -type f -name "*.JPG" -exec rename s/JPG/jpg/ {} \;
 +
 +find a file anywhere on the disk and ignore the "Permission denied" messages
 +  $ find / -name Wire.h 2>&1 | grep -v "Permission denied"
  
 grep grep
Line 55: Line 65:
   $ rsync SRC DEST   $ rsync SRC DEST
  
-synchronize two external hard disks+synchronize two external hard disks, dry run, real thing, ending slash required
  
-  rsync --dry-run --itemize-changes --delete -avh /media/passport/ /media/seagate# dry run+  rsync --dry-run --itemize-changes -avh /media/john/My\ Passport/pub/ /media/john/Seagate\ Expansion\ Drive/pub/
      
-  rsync --delete -avh /media/passport/ /media/seagate    # for real+  rsync -avh /media/john/My\ Passport/pub/ /media/john/Seagate\ Expansion\ Drive/pub/
      
   --dry-run   --dry-run
Line 79: Line 89:
   rsync --delete -avh -e "ssh -p 2222" --exclude '*.jpg' /media/passport/pub/songs/ '192.168.1.100:/storage/emulated/0/media/songs/'   rsync --delete -avh -e "ssh -p 2222" --exclude '*.jpg' /media/passport/pub/songs/ '192.168.1.100:/storage/emulated/0/media/songs/'
  
-find unique list of file types 
-  $ find ../ -type f | awk -F. '!a[$NF]++{print $NF}' 
- 
-find and execute command on files across files 
-  $ find /media/seagate/media/ -name Thumbs.db -exec rm {} \; # delete files across folders 
-  $ find ../ -type f \( -name "*.jpg" -o name "*.JPG" \) -exec rm {} \; 
-  $ find ../ -type f -name "*.JPG" -exec rename s/JPG/jpg/ {} \; 
  
files.1637205867.txt.gz · Last modified: 2021/11/17 22:24 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki