OSX
To add a directory to $PATH (or edit other environmental variables):
edit ~/.bash_profile
To run bash_profile:
source ~/.bash_profile
if bash_profile doesn't exist - create one. Sample (working) bash_profile content:
export PATH="$PATH:/Users/andrii/software/apache-tomcat-9.0.10/bin"
To find folder size
cd folderName
du -hs
To compare contents of two folders recursively:
diff -rq folderA folderB
rq: r tells it to scan resucrively
q tells it "quick" - do not display line-by-line differences
To compare two text files' contents:
wdiff -s a.txt b.txt
To install wdiff:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
and press enter/return key. Wait for the command to finish.
Run:
brew install wdiff
To extract a jar file:
jar xf filename.jar
To display directory tree:
tree