Last active
March 2, 2019 22:42
-
-
Save oboje/b00a1bef35a584288f9c to your computer and use it in GitHub Desktop.
Useful macOS Terminal Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#remote pc on/off | |
username=igor | |
ipaddr=192.168.0.40 | |
macaddr=10:FE:ED:37:1F:67 | |
alias pc_off='net rpc shutdown -I $ipaddr -U $username' | |
alias pc_on='wakeonlan $macaddr' | |
#spoof mac addr | |
sudo ifconfig en0 ether d4:33:a3:ed:f2:16 | |
#run webservice in local dir | |
ruby -run -ehttpd . -p8000 | |
##macOS appearance - | |
# hidden files | |
defaults write com.apple.finder AppleShowAllFiles YES | |
#notification from terminal | |
osascript -e 'display notification "Done" with title "Terminal Message"' | |
#upload several files scp | |
scp file.jpg file2.jpg $username@$ipaddr:~/upload | |
#update system | |
sudo softwareupdate --install --all s | |
# sync with progress | |
sudo rsync -vaE --progress $from $to | |
# see install log | |
cat /private/var/log/install.log | open -f | |
#spoof mac addr | |
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's%\(..\)%\1:%g; s%.$%%') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment