Find out specific file (sql file) in vps

2014 is here and happy new year everyone 🙂 . As new year come I want to do ‘clean up’ for some vps and get rid from unused or old file that no longer useful on my vps server. Since the content handle by many side I can not delete many file and only able to delete sql file. The problem is I can not remember where I put the file?

Linux come with ‘find’ command and I can concentrate on “public_html” folder :

$ find public_html -name \*.sql -print
public_html/polling/dbdbd.sql
public_html/polling/pollingdb.sql
public_html/polling/dbdb/bukudb2.sql
public_html/polling/dbdb/bukudb.sql
public_html/home/cometchat/plugins/filetransfer/uploads/bpk.sql
public_html/reservasi/Addons/dbReservasi.sql
public_html/adminphp/scripts/upgrade_tables_mysql_4_1_2+.sql
public_html/adminphp/scripts/create_tables.sql
public_html/adminphp/scripts/create_tables_mysql_4_1_2+.sql
public_html/Hanz/elfinder-2.0-rc1/php/MySQLStorage.sql
public_html/hanz2/fig/figdb2.sql
public_html/hanz2/fig_old/figdb.sql

Wow, at least I know that garbage is exist.

Time to work now.

P.S : other useful command

$ncdu

ncdu 1.7 ~ Use the arrow keys to navigate, press ? for help
— /home/working/public_html ——————————————————
/..
5.4GiB [##########]  public_html2014.tar.gz
2.9GiB [#####     ] /picture
2.2GiB [####      ]/cover                                                                                                                    292.9MiB [          ] /Hanz
246.3MiB [          ] /hanz2

ncdu : NCurses Disk Usage