Felipe Barriga Richards Blog

Blog personal de Felipe Barriga Richards
May 5, 2010

Listing and deleting files in a terminal (bash)

Delicious Delicious Facebook Facebook TwitterTwitter Categories: Otros - Tags: ,

There are infinite ways of doing the following commands but here you can find some examples. They can be very useful when you need to manage a lot of files in different directories.

Using ‘find’

Delete empty files using find:

felipe@funstation:$ find dir/ -type f -empty -print0 | xargs rm -f

Read it all..

September 5, 2009

Acortando el Path en el prompt del terminal (bash)

Delicious Delicious Facebook Facebook TwitterTwitter Categories: Otros - Tags: ,

A mas de alguno le habra pasado que cuando estan en un directorio con muchos niveles de profundidad del tipo:
/home/user/mis_archivos/personal/documentos/documentos-importantes/
Les ocupa la mitad de la linea del terminal. Para solucionar eso solo necesitan cambiar la variable PS1.
Read it all..