Commands by luxaeterna101 (2)

  • curl -sLkIv --stderr - https://t.co/2rQjHfptZ8 -s: silences the output when piped to a different command -L: follow every redirect -k: ignores certificate errors -I: just request the headers -v: be verbose --stderr - : redirect stderr to stdout https://t.co/2rQjHfptZ8: URL to check for redirects piped to grep -i location: -i: grep target text ignoring case location: : greps every string containing "location:" piped to awk {'print $3'} prints the third column in every string piped to sed '/^$/d' removes blank lines Show Sample Output


    1
    curl -sLkIv --stderr - http://example.org | grep -i location: | awk {'print $3'} | sed '/^$/d'
    luxaeterna101 · 2019-02-28 12:07:27 0
  • Formats nicely the Openvpn log file. Show Sample Output


    0
    column -ts , /etc/openvpn/openvpn-status.log
    luxaeterna101 · 2016-05-17 09:36:58 1

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

Fix for error perl: warning: Setting locale failed.
Fix for ubuntu error: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_GB:en", LC_ALL = (unset), LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory

list files recursively by size

"hidden" remote shell
opens a "hidden" remote shell (login will not appear in "last" for example). This is not really hidden, because the login will be shown in auth.log and the process is visible anyways. ssh -T = Disable pseudo-tty allocation. bash -i = interactive shell

Remove all backup files in my home directory
I use this simple command for remove all backup files generated usually by editors like Vim and Emacs.

bash find function
basic find implementation for systems that don't actually have find, like an android console without busybox installed.

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

most used unix commands

do a full file listing of every file found with locate

use mplayer to watch Apple Movie Trailer instead of quicktime player
http://trailers.apple.com/trailers/ just copy the .mov link and use mplayer to stream

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.


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: