til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Are You Sure?

This might be the oldest trick I learned when I started using rm and mv on the command line on Linux ages ago.

The trick is to use the -i option to rm and mv to make sure you are not deleting or moving the wrong files.

alias rm='rm -i'

By creating an alias for rm you will be prompted for confirmation before deleting files, since the alias will let rm be replaced by rm -i which prompts for confirmation.

The same pattern can be used for other commands and simple as it is it can be a lifesaver.