Commands by ianux (3)

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

SoX recording audio and trimming silence
Records audio from your mic in FLAC (Free Lossless Audio Codec) format, starts only after it detects at least 0.1 seconds of noise and stops after 1 second of silence. You can adjust the percent values (sensitivity) to best fit your microphone and voice (0.1% if you have a great quality mic, higher if you don't, 0% does not trim anything). Useful for speech recognition in conjunction with my previous command titled 'Google voice recognition "API"' (http://www.commandlinefu.com/commands/view/8043/google-voice-recognition-api).

Redirect incoming traffic to SSH, from a port of your choosing
Stuck behind a restrictive firewall at work, but really jonesing to putty home to your linux box for some colossal cave? Goodness knows I was...but the firewall at work blocked all outbound connections except for ports 80 and 443. (Those were wide open for outbound connections.) So now I putty over port 443 and have my linux box redirect it to port 22 (the SSH port) before it routes it internally. So, my specific command would be: $iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 22 Note that I use -A to append this command to the end of the chain. You could replace that with -I to insert it at the beginning (or at a specific rulenum). My linux box is running slackware, with a kernel from circa 2001. Hopefully the mechanics of iptables haven't changed since then. The command is untested under any other distros or less outdated kernels. Of course, the command should be easy enough to adapt to whatever service on your linux box you're trying to reach by changing the numbers (and possibly changing tcp to udp, or whatever). Between putty and psftp, however, I'm good to go for hours of time-killing.

Send a local file via email
if "mail -a" fail, try "mutt -a" or "nail -a"

Sort your music
This will mv all your mp3 files in the current directory to $ARTIST/$ALBUM/$NAME.mp3 Make sure not to use sudo - as some weird things can happen if the mp3 file doesn't have id3 tags.

gdfgdfgdfg erter sfdgsdfg
https://rentry.co/4fhs6r https://pastelink.net/4dchfq3w https://glot.io/snippets/gqonl998st https://controlc.com/f454d846 https://telegra.ph/hdfghd-rtytr-dfgfg-11-17 https://www.linkedin.com/showcase/update-v-bucks-2023/ https://www.linkedin.com/showcase/free-roblox-2023-2024/ https://forums.hitched.co.uk/chat/forums/thread/dgfhrt-dfghrtr-dghdfg-1147811/ https://followme.tribe.so/post/https-rentry-co-4fhs6r-https-pastelink-net-4dchfq3w-https-glot-io-snippets---65579c25687026cb5a3c99d5 https://www.pixiv.net/en/users/100563223 https://www.furaffinity.net/journal/10737070/ https://www.bankier.pl/forum/temat_dfghrthrtrt,63536509.html https://ok.ru/video/7163392363253 https://profile.hatena.ne.jp/jghjtytyaas/profile

Daily watch "question pour un champion" (French TV show)
kaffeine could be replaced by any player able to read mms stream

Update IP filter for qBittorrent
Downloads Bluetack's level 1 IP blocklist in .p2p format, suitable for various Bittorrent clients.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Extract a IRC like chat log out of an Adium xml logfile

Print a great grey scale demo !
Seen here: http://www.pixelbeat.org/docs/terminal_colours/


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: