You are here

Shell Commands

Shell command snippets

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php composer-setup.php --install-dir=bin
php composer-setup.php --filename=composer
php composer install
find . -type f -exec sed -i 's/foo/bar/g' {} \;
grep -r "foo" .
grep -e "mysql -u root -p -e 'drop database XYZ'" /home/*/.bash_history
grep -e "mysql -u root -p -e 'drop database XYZ'" /root/.bash_history
$ tail -f /var/log/httpd/error_log
$ grep 'login.php' /var/log/httpd/error_log
$ egrep -i "denied|error|warn" /var/log/httpd/error_log
0,30 * * * * cd /home/drupal && drush @sites core-cron -y > /dev/null   #enter crontab -e
php -r 'print_r(hash_algos())'
apt-cache search ".-dev"
RedirectMatch 403 "/(install|update|cron|xmlrpc|authorize).php"