computers:tricksandtips
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computers:tricksandtips [2023/07/12 16:22] – [rsync through tar] david | computers:tricksandtips [2025/01/27 16:40] (current) – [rsync Windoze Files] david | ||
---|---|---|---|
Line 362: | Line 362: | ||
< | < | ||
- | time tar -cf - / | + | # can also add --exclude="" on the first tar line to exclude a subdir |
- | + | ||
- | # just go to the directory | + | |
cd / | cd / | ||
time tar -cf - filename.bin | pigz | ssh user@server "/ | time tar -cf - filename.bin | pigz | ssh user@server "/ | ||
</ | </ | ||
+ | copy FROM a server back to yourself | ||
+ | < | ||
+ | bash-3.2$ ssh username@server "tar czf - --strip-components=PATHDEPTH / | ||
+ | </ | ||
+ | |||
+ | ===== rsync Windoze Files ===== | ||
+ | |||
+ | You need to expand the time stamp difference for Windoze to not re-copy everything; | ||
+ | |||
+ | < | ||
+ | # always have vP for verbose and progress | ||
+ | rsync --modify-window=5 -vPrltD NORMAL THING | ||
+ | # NO LUCK for me like this, but adding this does only check file size | ||
+ | |||
+ | rsync --size-only -vaP FROM/ TO/ | ||
+ | |||
+ | # try this | ||
+ | rsync --size-only -vPrltD # OR remove -t | ||
+ | |||
+ | # doing this on windows backup drive: | ||
+ | rsync --size-only -vPrlD | ||
+ | </ | ||
===== sshd Piping ===== | ===== sshd Piping ===== | ||
Line 384: | Line 404: | ||
==== Working ==== | ==== Working ==== | ||
- | On the machine you want to get connected to: | + | NOTE: Verified today this works from South Africa between my servers. |
+ | |||
+ | On the machine you want to get connected to: (-N to not get a prompt, just create the tunnel) | ||
ssh -R 6333: | ssh -R 6333: | ||
+ | # or | ||
+ | ssh -N -R 6333: | ||
+ | | ||
log into that machine and then connect to your box with: | log into that machine and then connect to your box with: | ||
ssh -p 6333 localhost | ssh -p 6333 localhost | ||
+ | # or | ||
+ | ssh -p 6333 userOnAboveMachine@localhost | ||
==== Richards Solution ==== | ==== Richards Solution ==== | ||
Line 686: | Line 713: | ||
find / | find / | ||
</ | </ | ||
+ | ==== Find and Copy Files Between Two Dates ==== | ||
+ | |||
+ | Use **newermt** switch to **find** and copy files that are human readable times / dates from one place to another. | ||
+ | |||
+ | < | ||
+ | find / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
==== Sort Text File By Second Column ==== | ==== Sort Text File By Second Column ==== | ||
Line 1099: | Line 1136: | ||
* This one converts video to the target format (mkv here) < | * This one converts video to the target format (mkv here) < | ||
youtube-dl -f mkv | youtube-dl -f mkv | ||
+ | </ | ||
+ | |||
+ | ====== MacOs ====== | ||
+ | |||
+ | ===== Scripting ===== | ||
+ | |||
+ | ==== bash ==== | ||
+ | |||
+ | === Files in Order === | ||
+ | |||
+ | Sometimes I have noticed files do not happen in order when doing command line things. | ||
+ | |||
+ | < | ||
+ | ls -v j080_202405* | sort | xargs cat > j080_overnight.jps | ||
</ | </ | ||
computers/tricksandtips.1689178978.txt.gz · Last modified: 2023/07/12 16:22 by david