Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 12, 2020 04:14 pm GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To