### Commands by Romero (6) the last day the last week the last month all time sorted by date votes

• 0
for i in *.*; do 7z a "$i".7z "$i"; done
· 2020-12-07 10:02:42
• xdelta is a command line program for delta encoding, which generates the difference between two files. This is similar to diff and patch, but it is targeted for binary files and does not generate human readable output. http://xdelta.org/

1
xdelta -d -s original_file delta_patch patched_file
· 2019-03-10 09:30:47
• A very simple command to toggle Chrome?s default style sheet. It uses the test command to see if the "Custom.css.off" file exists, if so, it will become "Custom.css", and if not, "Custom.css" is moved to "Custom.css.off" Thus, swapping. This is accomplished with "&&" and "||"

0
CSS=$HOME/.config/google-chrome/Default/User\ StyleSheets/Custom.css sh -c 'test -f "$CSS.off" && mv "$CSS.off" "$CSS" || mv "$CSS" "$CSS.off"'
· 2013-10-06 00:38:00

• 0
pactl list sinks | grep -q Mute:.no && pactl set-sink-mute 0 1 || pactl set-sink-mute 0 0
· 2013-09-29 16:01:20
• An alternative to built-in package manager, keep pandoc in sync with upstream releases. Show Sample Output

1
cabal update && cabal install pandoc
· 2013-08-25 14:25:43

• 0
· 2013-08-25 14:21:25

### 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.

### Check These Out

Convert files from DOS line endings to UNIX line endings
This method will also convert mac line endings.

List all files/folders in working directory with their total size in Megabytes

Get a list of all your VirtualBox virtual machines by name and UUID from the shell
A similar command that lists only the currently running VMs is thus: $VBoxManage list runningvms ...the above showing a list of VMs by name and UUID in the same format as the "$ VBoxManage list vms" command

Print a list of all hardlinks in the working directory, recursively
libpurple likes to hardlink files repeatedly. To ignore libpurple, use sed: | sed '/\.\/\.purple/d'

Displays only the VGA adapter/chipset being used for the graphics. In this case, it gave me the "M22" and "Mobility Radeon x300" that I needed to research a graphics issue I was having.

Swap a file or dir with quick resotre
This lets you replace a file or directory and quickly revert if something goes wrong. For example, the current version of a website's files are in public_html. Put a new version of the site in public_html~ and execute the command. The names are swapped. If anything goes wrong, execute it again (up arrow or !!).

cpu info

Create user add lines from partial passwd file
Handy if you are installing a new server or recovering an old one and you have a passwd file with the accounts you want to add to the server. If you edit the file so that only the accounts that you want to add are left this line will spit out the correct useradd lines. The uid, gecos and shell will be preserved.

List Network Tools in Linux
Get all the networking related commands for your distro

escape any command aliases
e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command