Commands tagged version (11)

  • Works for most distributions, tested on Ubuntu, Fedora, CentOS, Gentoo, SUSE, RedHat. Debian and Slackware: cat /etc/*version Show Sample Output


    11
    cat /etc/*-release
    sudopeople · 2009-02-26 08:22:01 6
  • Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted. Inspired by the excellent EVACopy http://evacopy.sourceforge.net Show Sample Output


    5
    backup() { source=$1 ; rsync --relative --force --ignore-errors --no-perms --chmod=ugo=rwX --delete --backup --backup-dir=$(date +%Y%m%d-%H%M%S)_Backup --whole-file -a -v $source/ ~/Backup ; } ; backup /source_folder_to_backup
    pascalv · 2018-08-02 21:27:29 0
  • This command will give you the detailed information about the installed perl modules i.e. installed path, Link type, version, files etc. Show Sample Output


    3
    perldoc perllocal
    octopus · 2010-04-14 10:57:56 1

  • 2
    sw_vers
    theoj · 2009-08-29 21:27:18 0
  • This is for Debian, simply change the path if your Flash plugin is installed elsewhere. Show Sample Output


    1
    strings /usr/lib/flashplugin-nonfree/libflashplayer.so |grep ^LNX
    domicius · 2012-04-25 10:34:57 0

  • 0
    nslookup -q=txt -class=CHAOS version.bind NS.PHX5.NEARLYFREESPEECH.NET
    unixmonkey4063 · 2009-06-02 19:54:24 1
  • If you use new features of a certain Bash version in your shell script, make sure that it actually runs with the required version.


    0
    if [ -z "${BASH_VERSINFO}" ] || [ -z "${BASH_VERSINFO[0]}" ] || [ ${BASH_VERSINFO[0]} -lt 4 ]; then echo "This script requires Bash version >= 4"; exit 1; fi
    hfs · 2011-02-25 11:02:47 0
  • Useful if you have multiple versions of Java installed. The 1.7 pkg for Mac doesn't tell you anything about where it's putting stuff. Show Sample Output


    0
    export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
    robinsonaarond · 2015-07-30 18:50:51 0
  • Cleaner than the top alternative Show Sample Output


    0
    test `uname` = Linux && lsb_release -a 2>/dev/null || ( test `uname` = SunOS && cat /etc/release || uname -rms )
    amhhhhhhh · 2017-04-25 13:35:40 0

  • -4
    lsb_release -d
    tebeka · 2009-05-07 16:19:04 6
  • Found in comments section works on most Linux flavors. Show Sample Output


    -8
    test `uname` = Linux && lsb_release -a || ( test `uname` = SunOS && cat /etc/release || uname -rms )
    virtualshock · 2009-07-07 20:51:30 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

Show all usernames and passwords for Plesk email addresses

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

Verify if ntpd is working properly
Used to verify if Network Time Protocol daemon is working properly.

Find UTF-8 text files misinterpreted as ISO 8859-1 due to Byte Order Mark (BOM) of the Unicode Standard.
Character: "?" is the Byte Order Mark (BOM) of the Unicode Standard. Specifically it is the hex bytes EF BB BF, which form the UTF-8 representation of the BOM, misinterpreted as ISO 8859/1 text instead of UTF-8.

Create a mirror of a local folder, on a remote server
Create a exact mirror of the local folder "/root/files", on remote server 'remote_server' using SSH command (listening on port 22) (all files & folders on destination server/folder will be deleted)

Start COMMAND, and kill it if still running after 5 seconds

Compare two files side-by-side
I found out about this from Unix Power Tools, and thought it was pretty useful. Use the -w option to change the width of the output, and the -s option to suppress lines that are the same in both files.

Install pip with Proxy
Installs pip packages defining a proxy

printing barcodes
64 elements max on 16 rows, 4 cols. GNU Barcode will adapt automagically the width and the eight of your elements to fill the page. Standard output format is PostScript.

resize all JPG images in folder and create new images (w/o overwriting)
Convert all jpegs in the current directory into ~1024*768 pixels and ~ 150 KBytes jpegs


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: