All commands (9)

  • 2
    bc -l <<< "scale=1000; 4*a(1)"
    cryptology_codes · 2020-03-11 15:58:21 3

  • 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 1
  • tar(1) and cpio(1) are not fully platform agnostic, although their file formats are specified in POSIX.1-2001. As such, GNU tar(1) might not be able to extract a BSD tar(1) archive, and ivce versa. pax(1) is defined in POSIX.1-2001. To extract an archive: pax -rf archive.tar

    pax -wf archive.tar /path
    atoponce · 2020-03-06 13:56:46 1
  • raw image created by canon digital camera. Install using apt-get install ufraw

    for i in *.CR2; do ufraw-batch $i --out-type=jpeg --output $i.jpg; done;
    shantanuo · 2020-03-22 03:08:23 1
  • Sometimes we install programs, we forget about them, and they stay there wasting RAM. This one-liner try to find them. Show Sample Output

    ps -eo cmd | awk '{print $1}'| sort -u | grep "^/" | xargs dpkg -S 2>/dev/null | awk -F: '{print $1}' | sort -u | xargs apt-mark showmanual
    pabloab · 2020-03-26 06:16:45 0
  • Run inside Command Prompt (cmd.exe) as admin. Note that you must close explorer.exe first, and even so some files will not be deleted, will say "Access is denied." To definitely delete them enter with another admin user or from other operating system and access the drive. Show Sample Output

    DEL /F /S /Q /A %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db
    bugmenot · 2020-03-27 16:53:23 1
  • I can think of using this command after compiling an downloaded source from anywhere as an easy way to find all executable products. We usually issue the find command (without arguments) to list the full paths of all directories and sub-directories and files in the entire current tree. Similar command is tree -aicfnF

    find -executable -type f
    knoppix5 · 2020-03-29 11:46:18 1
  • Will delete empty directories and sub-directories (hideen too = whose names are starting with dot .). Used 'rm' command instead of 'rmdir' to give the possibility of asking for confirmation before deleting i.e. it is not wise do delete all empty directories in /etc folder. Replace dot in 'find .' with any for other starting directory instead of current. in 'rm -i -R' 'i' stands for ask before delete and 'R' for delete folder recursively or folder itself if it is empty

    find . -type d -empty -exec rm -i -R {} \;
    knoppix5 · 2020-03-29 13:12:21 1
  • You can get an approximate idea of how long your data export might take. Show Sample Output

    mysqldump --login-path=mypath sbtest sbtest4 | pv --progress --size 200m -t -e -r -a > dump.sql
    shantanuo · 2020-03-30 09:15:16 1

What's this? 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

Install pip with Proxy
Installs pip packages defining a proxy

check open ports without netstat or lsof

silent/shh - shorthand to make commands really quiet
Sometimes I just want to run a command quietly but all that keyboard shifting makes my fingers hurt. This little function does the job eg.: $ if shh type less; then PAGER=less; fi

split source code to page with numbers

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"

Stop Flash from tracking everything you do.
Brute force way to block all LSO cookies on a Linux system with the non-free Flash browser plugin. Works just fine for my needs. Enjoy.

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"

File rotation without rename command
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name. i.e.: logfile.1.gz > logfile.2.gz I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Burst a Single PDF Document into Single Pages and Report its Data to doc_data.txt
Require the pdftk package It ll split each page in your pdf file , into a new pdf file and report info on doc_data.txt

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.


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: