Archive | May 2012

You are browsing the site archives by date.

decompress and compress folder in linux

you can decompress in one fell swoop by using tar -xzvf file.tar.gz and compress similarly using tar -czvf file.tar.gz filedir/* file1 file2 Advertisements

How to check a folder size in linux

we can check the size of a folder in linux by typing command du -hs /path/to/folder

Writing cron job to run tasks on every system reboot.

Yesterday i dealing with the problem that i want to start delayed_job in rails after each system reboot. after finding for a while i find that we can set a “cron job” which will execute after each rebbot by just wrting following command : first type crontab -e that will open an cron editor and […]

Address already in use: make_sock: could not bind to address on apache command

When i try to restart the apache i get an error : (98)Address already in use: make_sock: could not bind to address After spending much time i get a solution as : i type sudo netstat -ltnp | grep ‘:80’ (it is important to note that apache was hanging and it did not matter […]

Check rails app log in heroku.

We can check log of application on heroku just by typing “heroku logs –source app” and “heroku run console” to access rails console from heroku.

Drop database in heroku

To drop a database in heroku just type heroku pg:reset SHARED_DATABASE