Skip to content

Tag: terminal

flatten directory structure

Move files in current subdirectories to the current directory.

find . -mindepth 2 -type f -exec mv -t . -i '{}' +

Delete local folders that are empty.

 find . -empty -type d -delete

Terminal with colors in OpenSolaris

As the earlies versions of OpenSolaris, my terminal is without colors. That’s a little annoying. As the default user uses Bash you can configure your Bash options in the file ~/.bashrc. Insert in the last lines of your .bashrc file:

alias ls=’ls –color=auto’

Save, close and open your terminal (or just type source ~/.bashrc).