Commands by renich (11)

  • This fetches ipfs v0.36.0 for GNU/LInux and puts it in ~/bin without a tmp file or anything else. This works if you already have ~/bin. The `--strip-components=1` flag removes the "kubo" directory in this case. If you have a tar with an even deeper directory structure, say: `some/other/directory/file`, you can just use `--strip-components=3` and it will only extract `file` for you. `-C ~/bin` puts the file in the designated path. In this case, `~/bin`. Show Sample Output


    2
    tar --strip-components=1 -C ~/bin/ -xzf <( curl -L https://dist.ipfs.tech/kubo/v0.36.0/kubo_v0.36.0_linux-amd64.tar.gz ) kubo/ipfs
    renich · 2025-08-12 03:38:07 0

  • 9
    ssh -J user@reachable_host user@unreacheable_host
    renich · 2019-08-14 17:29:45 0
  • It finds, specifically, the connections to the HTTP and HTTPS ports as source ports. You can check for destination ports as well. Show Sample Output


    7
    ss -o state established '( dport = :http or sport = :https )'
    renich · 2019-08-14 17:28:13 0
  • This command uses -newerXY to show you the files that are modified since a specific date. I recommend looking for "-newerXY" on the manpage to get the specifics.


    3
    find /path/to/somewhere -newermt "Jan 1"
    renich · 2014-02-02 18:02:07 0
  • It clears caches from memory. It works fine on CentOS and Fedora. It will show you how much memory you need, for real.


    -4
    sync; echo 3 > /proc/sys/vm/drop_caches
    renich · 2011-04-26 21:12:06 0
  • This is not recommended... lossy -> lossy = lossier. Still, you can do it! ;)


    0
    find . -iname '*.mp3' | while read song; do mpg321 ${song} -w - | oggenc -q 9 -o ${song%.mp3}.ogg -; done
    renich · 2010-03-14 11:34:35 0
  • This command is useful for renaming a clipart, pic gallery or your photo collection. It will only change the big caps to small ones (on the extension). Show Sample Output


    8
    find /path/to/images -name '*.JPG' -exec rename "s/.JPG/.jpg/g" \{\} \;
    renich · 2010-01-02 19:12:37 4
  • Nice interface for an info page.


    1
    yelp info:foo
    renich · 2009-03-29 07:14:48 2
  • A great way of viewing some man page while using gnome.


    3
    yelp man:foo
    renich · 2009-03-29 07:13:44 3
  • A great password generation tool. http://www.adel.nursat.kz/apg/ Show Sample Output


    3
    apg -a 0 -n 10
    renich · 2009-03-28 08:52:59 4
  • This command is a powerful "detoxifier" that eliminates special chars, spaces and all those little chars we don't like. It support several "sequences" so be sure to check your /usr/local/etc/detoxrc while at it... and maybe define your own Show Sample Output


    16
    detox -r -s utf_8 /path/to/old/win/files/dir
    renich · 2009-03-16 07:50:36 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

Backup your LDAP
Simple way to backup your LDAP entries: put this line on your crontab. The -n switch identifies the dbnum you want to backup (alternatively you can use -b suffix. Check man slapcat for your personal switches)

Find out how old a web page is
I is for headers only s is for silence curl -Is outputs ONLY headers the pipe and grep is to filter them to Modified only..

Another way to see the network interfaces
Like many other thing in Linux ,you can see the same thing in different way.

Delete Last Line of a File if it is Blank
Use sed to remove the last line of a file only if it is empty.

google tts

dump the whole database

Size(k) of directories(Biggest first)
somewhat faster version to see the size of our directories. Size will be in Kilo Bytes. to view smallest first change '-k1nr' to '-k1n'.

Export log to html file
Logtool is a nice tool that can export log file to various format, but its strength lies in the capacity of colorize logs. This command take a log as input and colorize it, then export it to an html file for a more confortable view. Logtool is part of logtool package.Tested on Debian.

Generat a Random MAC address

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"


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: