Commands tagged version (12)

  • 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
  • If you use new features of a certain Bash version in your shell script, make sure that it actually runs with the required version.


    1
    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
  • 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
  • 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

  • 0
    & 'C:\cwRsync_5.5.0_x86_Free\bin\rsync.exe' --force --ignore-errors --no-perms --chmod=ugo=rwX --checksum --delete --backup --backup-dir="_EVAC/$(Get-Date -Format "yyyy-MM-dd-HH-mm-ss")" --whole-file -a -v "//MyServer/MyFolder" "/cygdrive/c/Backup"
    pascalv · 2020-03-06 10:17:42 14

  • -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

Patator: A Hydra brute force alternative

check open ports without netstat or lsof

Install pip with Proxy
Installs pip packages defining a proxy

Sort processes by CPU Usage

split a multi-page PDF into separate files
Have to do this once per output file, because if device is 'pdfwrite', even if 'gs' sees '%d' in the OutputFile it still only creates one single output file. Embed it into a simple shell script if you want to split a document out into one file for every page.

Get IPv4 of eth0 for use with scripts
I've been using it in a script to build from scratch proxy servers.

Make info pages much less painful
The pinfo package makes info pages much more bearable. It is a ncurses-based POSIX utility for viewing info and man pages using lynx style keyboard shortcuts and rendering. Links are highlighted blue, the current location of your cursor is red. Navigating and searching are easy. Worth the install.

Quick notepad
Quick write some notes to a file with cat. Ctrl+C when you have finish.

count files by type
displays a list of all file extensions in current directory and how many files there are of each type of extension in ascending order (case insensitive)

Find the process you are looking for minus the grepped one
Get the PID of a process by name


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: