Commands by greeneggs (0)

  • bash: commands not found

What's this? 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

print first n characters of any file in human readble form using hexdump
Usefull to determine unknown file type

output stats from a running dd command to see its progress
if you start a large dd and forgot about statistics, but you still wonder what the progress is this command in an OTHER terminal will show you the way. NOTE: the watch command by itself will not output anything NOTE: the kill command will not kill the process

Alert visually until any key is pressed
I learned a few things reading this command. But I did run into a few issues: 1. On systems that don't use GNU echo (e.g. macOS 10.14.5 Mojave), the e option may not be supported. In this case ANSI escape codes will echoed as text and the terminal will not flash, like this: \e[?5h\e[38;5;1m A L E R T Thu Jun 20 16:31:29 PDT 2019 2. Since the read command strips\ignores leading backslashes, if a user types the backslash character once in the loop, it will not break. Typing backslash twice in a loop will break as expected. 3. The foreground color is set to red (\e[38;5;1m) on every loop. This could be set once before we call while, and then reset once when the loop breaks. 4. Instead of resetting the foreground color when it breaks, the video mode is set back to normal (\e[?5l). This has the effect of leaving the terminal text red until it is manually reset. The alternative I'm proposing here addresses these issues. I tested it on macOS and Arch Linux.

ASCII webcam live stream video using mplayer
Mplayer starts a webcam capture using ASCII art. Only mplayer required

Alert on Mac when server is up
When run on a mac, this command will bring up a dialog box in the Terminal when server HOSTNAME first responds to a ping.

Rolling upgrades via aptitude
This has been my "sysupgrade" alias since ca. 2006, first used on Debian Sid, then Sabayon, and it still does its duty on Mint nowadays without breaking stuff.

Find the package that installed a command

find all open files by named process
lists all files that are opened by processess named $processname egrep 'w.+REG' is to filter out non file listings in lsof, awk to get the filenames, and sort | uniq to remove duplciation

Make changes in .bashrc immediately available
Any changes to BASH shell made in .bashrc will be active in the current terminal window from the moment you execute this command, ie. aliases, prompt settings etc. No need to restart terminal. (In BASH 'source' simile to 'eval' lets you generally execute any bunch of commands stacked in a text file).

Put public IP address in a variable

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.


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: