you are in: codestackercodes [RSS] → tag: shell [RSS]

delete recursively a file (.DS_Store, thumbs.db...) Delicious Email

show/hide lines
   1  find . -name ".DS_Store" -depth -exec rm {} \;
created by leozera — 22 August 2009 — get a short url — tags: find shell embed

backup all mysql database Delicious Email

show/hide lines
   1  mysqldump -u username -ppassword –all-databases > dump.sql
created by leozera — 22 August 2009 — get a short url — tags: backup mysql shell embed

find large files Delicious Email

show/hide lines
   1  sudo find / -type f -size +200000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
created by leozera — 25 January 2009 — get a short url — tags: shell embed

remove SVN control Delicious Email

removes all .svn directories recursively

show/hide lines
   1  find . -name .svn -exec rm -rf {} \; 
   2  
   3  find . -name .svn -print0 | xargs -0 rm -rf
created by leozera — 29 September 2008 — get a short url — tags: shell subversion svn embed

color your os x shell Delicious Email

open your ~/.bash_profile, paste and be happy!

show/hide lines
   1  export CLICOLOR=1
   2  export LSCOLORS=ExFxCxDxBxegedabagacad  
created by leozera — 29 September 2008 — get a short url — tags: mac shell embed

popular commands in your shell Delicious Email

my results:

146 svn 91 ./script/server 90 cd 38 ls 19 ssh 18 mate 12 rake 11 sudo 8 ping 8 find
show/hide lines
   1  history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn|head -10
created by leozera — 17 September 2008 — get a short url — tags: awk bash shell embed

Exibe o número de arquivos em um diretório Delicious Email

show/hide lines
   1  ls -1 | wc -l
created by rafaess — 11 July 2008 — get a short url — tags: contador diretorio shell embed

mysql one line all database backup Delicious Email

show/hide lines
   1  mysqldump --al-databases -u -p > backup.sql
created by anonymous — 04 July 2008 — get a short url — tags: backup mysql shell embed