Monday, February 5, 2007

Web Developers: 13 Command Line Tricks You Might Not Know

Web Developers: 13 Command Line Tricks You Might Not Know

1. ln -s /some/destination name_of_link
2. tail -f /some/file
3. ctrl+z and bg
4. fg and jobs
5. Hit the freakin tab key!
6. scp
7. screen
8. Create a file (the fast way) with touch
10. Backup and reload your databases
11. Make a directory tree (the fast way)
12. killall: kill a process by name
13. Alias: Create your own commands

Miscellaneous Tricks
  • ls -lSr List files (sorted by size)
  • df -h Show available disk space in human-readable format
  • du -sh /some/dir Show how much space /some/dir is taking up
  • ps aux | grep blah List all the running processes but only show ones that contain 'blah'
  • wget -spider http://0at.org Fetch pages and behave like a web spider: don't download the pages, just check to see if they are there
  • ab - Apache benchmark, use this if you want a quick n' dirty way to benchmark how well your site performs under a heavy load.
  • perl -i -pe 's/foo/bar/gi' * search through * and replace all foo with bar



see also:

HOWTO: Benchmark Drupal code


Drupal benchmark results

No comments:

Digg / Technology

Blog Archive