An Interest In:
Web News this Week
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
- March 23, 2024
- March 22, 2024
May 12, 2020 04:14 pm GMT
Original Link: https://dev.to/jrohatiner/command-line-snippets-do-you-keep-handy-3fac
Command Line Snippets do you keep handy?
Here are a few commands I keep handy:
Bash
// root login ssh
ssh root@my-ip-here
// find PID
sudo lsof -i :
// kill port
sudo kill -9
// To remove a directory that contains other files or directories
rm -r mydir
// don't receive a prompt for each file being removed
rm -rf mydir
Brew
brew update && brew upgrade && brew cleanup && brew doctor
Git
// remove a repo
find . -type f | grep -i ".git" | xargs rm
cd ..
rm -rf
//sets your name and email for commit messages
git config --global user.name 'John Doe'
git config --global user.email [email protected]
// helps recover from mess ups! a log of your last few actions
git reflog
Original Link: https://dev.to/jrohatiner/command-line-snippets-do-you-keep-handy-3fac
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To