Commands by shanford (2)

  • We had a number of git tags named similarly to: 2016.12.13.devel.feature 2016.12.14.master.release But we have multiple developers making commits and tags for testing purposes. I wanted to reduce the number of tags that displayed on our cloud hosting server when doing a deployment.


    0
    git ls-remote --tags origin | awk '/^(.*)(\s+)(.*)(YOUR-TAG-SPECIFIC-SEARCH-TERM-HERE)(.*)(-+)(.*)[^{}]$/ {print ":" $2}' | xargs git push origin
    shanford · 2017-03-06 21:59:15 0
  • I was looking for an easy solution where I could list all of the directories that had a specific file, not to replace it, but more of providing a list to a third-party or for my own reference. Show Sample Output


    0
    find $(pwd) | grep README.txt
    shanford · 2015-01-16 16:58:04 0

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Change Gnome wallpaper
You can use this in a script which rotates wallpapers from a directory at each login.

Using ASCII Art output on MPlayer
Not so useful. Just a cool feature.

Join lines
Even shorter. Stolen from comment posted by eightmillion.

Generate QR code for a WiFi hotspot
Prompts for network name (SSID) and password, and generates (as qr-wifi.png) a WiFi QR code (e.g. "WIFI:S:mynet;T:WPA;P:mypass;;" for mynet/mypass). Dependencies [sudo apt-get install]: qrencode zenity

Quick access to ASCII code of a key

generate a telephone keypad
Draw a telephone keyboard, using just a shell built-in command.

print a python-script (or any other code) with syntax-highlighting and no loss of indentation

BackTrack Repos
Add the BackTrack repositories to your Debian based GNU/Linux distribution. Thanks to http://it-john.com/home/technology/linux-technology/add-back-track-4-repo-to-ubuntu/

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Count all conections estabilished on gateway


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: