Skip to content

Instantly share code, notes, and snippets.

@dkoudlo
Last active April 12, 2017 22:11
Show Gist options
  • Save dkoudlo/b8a992353f79e279cd17bb1d2ddaaf73 to your computer and use it in GitHub Desktop.
Save dkoudlo/b8a992353f79e279cd17bb1d2ddaaf73 to your computer and use it in GitHub Desktop.
Linux Commands

GIT

create new branch tracking origin/develop

git checkout -b new_branch origin/develop

push new branch to origin

git push -u origin new_branch

Archives

To compress:

tar -zcvf archive_name.tar.gz directory_to_compress

To decompress:

tar -zxvf archive_name.tar.gz

Networking

Open Ports
sudo lsof -i
sudo netstat -lptu
sudo netstat -tulpn

Find and Execute

find ./ -name "*.json" -exec sh -c 'cat {} | grep "2017-02"' \;

Check Space in current directory

du -sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment