Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

Is .zprofile replacing .bash_profile in macOS?

 In the macOS 12+ (Monteray, etc.) the .zprofile is replacing .bash_profile



As an Amazon Associate I earn from qualifying purchases.

Is .zprofile replacing .bash_profile in macOS?

 In the macOS 12+ (Monteray, etc.) the .zprofile is replacing .bash_profile



As an Amazon Associate I earn from qualifying purchases.

Mac: moving large amount of files off to external drive

I have tried to clean up my hard drive in preparation to upgrade to SSD. Moving files using Finder FAILS all the time an in the end you don't know what was copied and what was not.

I used rsynch tool because it it smart enough to copy ONLY new and changed files, so I can run it multiple times and transfer only the differences (delta).

$ sudo rsync -varpog --progress ~/Documents/SourceDir/ /Volumes/1TB_BU/DestinationDir/  Password:building file list ... 8943 files to consider.DS_Store      159748 100%  121.10MB/s    0:00:00 (xfer#1, to-check=8941/8943)2013-08-15 09.35.24.mp4    87290465 100%   22.57MB/s    0:00:03 (xfer#2, to-check=7445/8943)2013-08-15 11.51.18.jpg

...sent 26005122366 bytes  received 163790 bytes  20565667.19 bytes/sec
total size is 35588964732  speedup is 1.37

Consecutive runs:

$ sudo rsync -varhpog --progress ~/Documents/SourceDir/ /Volumes/1TB_BU/DestinationDir/  

building file list ... 8943 files to consider
sent 173.28K bytes  received 20 bytes  346.61K bytes/sectotal size is 35.59G  speedup is 205355.70



Options:

-h show full help

-v verbose
--progress show progress while transfer
-h unman readable
-q quiet for non-error
-r recursive
-a archive
-b backup
-p preserve permissions
-o preserve owner
-g preserve group
-z compress data during the transfer




As an Amazon Associate I earn from qualifying purchases.

Mac: moving large amount of files off to external drive

I have tried to clean up my hard drive in preparation to upgrade to SSD. Moving files using Finder FAILS all the time an in the end you don't know what was copied and what was not.

I used rsynch tool because it it smart enough to copy ONLY new and changed files, so I can run it multiple times and transfer only the differences (delta).

$ sudo rsync -varpog --progress ~/Documents/SourceDir/ /Volumes/1TB_BU/DestinationDir/  Password:building file list ... 8943 files to consider.DS_Store      159748 100%  121.10MB/s    0:00:00 (xfer#1, to-check=8941/8943)2013-08-15 09.35.24.mp4    87290465 100%   22.57MB/s    0:00:03 (xfer#2, to-check=7445/8943)2013-08-15 11.51.18.jpg

...sent 26005122366 bytes  received 163790 bytes  20565667.19 bytes/sec
total size is 35588964732  speedup is 1.37

Consecutive runs:

$ sudo rsync -varhpog --progress ~/Documents/SourceDir/ /Volumes/1TB_BU/DestinationDir/  

building file list ... 8943 files to consider
sent 173.28K bytes  received 20 bytes  346.61K bytes/sectotal size is 35.59G  speedup is 205355.70



Options:

-h show full help

-v verbose
--progress show progress while transfer
-h unman readable
-q quiet for non-error
-r recursive
-a archive
-b backup
-p preserve permissions
-o preserve owner
-g preserve group
-z compress data during the transfer




As an Amazon Associate I earn from qualifying purchases.

Android: restarting app (APK) via adb

Often when you work with APK you need to restart it, it is much faster to create a Bash script for that:

echo '*** restart XYZ APK***'
echo 'Continue?'
read input
adb shell am force-stop com.xyz.package;
adb shell am start -n com.xyz.package/.SomeMainActivity


As an Amazon Associate I earn from qualifying purchases.

Android: restarting app (APK) via adb

Often when you work with APK you need to restart it, it is much faster to create a Bash script for that:

echo '*** restart XYZ APK***'
echo 'Continue?'
read input
adb shell am force-stop com.xyz.package;
adb shell am start -n com.xyz.package/.SomeMainActivity


As an Amazon Associate I earn from qualifying purchases.

GWTShell arguments

[java] Google Web Toolkit 1.4.61
[java] GWTShell [-port port-number | "auto"] [-noserver] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logLevel level] [-gen dir] [-out dir] [-style style] [url]
[java] where
[java] -port Runs an embedded Tomcat instance on the specified port (defaults to 8888)
[java] -noserver Prevents the embedded Tomcat server from running, even if a port is specified
[java] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
[java] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
[java] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[java] -gen The directory into which generated files will be written for review
[java] -out The directory to write output files into (defaults to current)
[java] -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[java] and
[java] url Automatically launches the specified URL


As an Amazon Associate I earn from qualifying purchases.

apt quotation..