Bash
- convert DOS files to MAC files
brew install dos2unix
dos2unix [file]
- creating files
touch file.txt
touch files(1..100).txt —>100 files
- giving permissions
chmod u=rwx,go=rx file
chmod 755 file (full permissions for owner, read and execute for others)
- open current folder from terminal
open .
- see logs
tail -1000f application.log
- count number of lines
find . -name '*.py' | xargs wc -l | sort
- see all PATH values
export -p
- see running processes
ps -fea
ps aux | greep "process_name"
- see parent process
ps -o ppid= 4157
- identify and stop the process that are listening on port 8086
netstat -ano | findstr :8086
taskkill //PID 16796 //F