ashleyknowles

IT professional, Formula 1 addict, security/hacking enthusiast, I love LAMP

Linux

CLI One Liners – www.linux.com/archive/feature/141921

  • For each hostname in file hosts.dns, print the hostname and return the NS record
    for line in `cat hosts.dns`; do echo $line; dig ns $line +short; done
  • MySQL import:
    mysql -D databasename < database.sql
  • Replace all occurrences in a directory, of foo, with bar
    find ./ -type f -exec sed -i 's/foo/bar/g' {} \;

Leave a Reply

Required fields are marked *.

*


site tracking with Asynchronous Google Analytics plugin for Multisite by WordPress Expert at Web Design Jakarta.