≡ Menu

grep command

HowTo: grep All Sub-directory For Files

How do I grep all sub directories? How can I use grep command through all sub-directories on Linux or Unix like operating systems? How do I use grep to find pattern including all subdirectories on OS X/BSD/Unix-like operating systems?
[click to continue…]

I know how to gracefully restart Apache web server under Unix like operating system. I made changes to nginx.conf. How do I gracefully restart Nginx web server? How do I make changes in a Nginx server config file to take effect without restarting the Nginx server itself without interrupting users' current session?
[click to continue…]

MySQL/MariaDB Server: Bind To Multiple IP Address

I have MySQL/MariaDB database system running on a FreeBSD/Linux server. The server has multiple ip address. The mysqld used by many websites hosted on two other CentOS Linux based servers. I would like to bind MySQL sever running on a Linux or Unix-like server to more than one IP address such as 202.54.1.2, 202.54.1.10, and 202.54.1.15. How can I bind mysqld to multiple ips?
[click to continue…]

I have a PHP application developed and running on LAMP. I have APC installed on the server. APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. The APC based caching is good for my web site, but my cron jobs and php cli scripts fail to
fetch correct data due to caching. How do I disable APC module at the command line (php-cli) under Linux or Unix like operating systems for all my cron jobs?
[click to continue…]

I'm using Debian Linux as my development workstation. I would like to search a directory called ~/projects/ recursively for "foo" word only for *.txt files. How do I search all text files in ~/projects/ for "foo" word using grep command?
[click to continue…]

I would like to search and find all files which contain a word called "main()" for all directories located in $HOME/project/school. How do I use the grep command to find text including all subdirs under Unix or Linux operating systems?
[click to continue…]

How do I find out my SATA link speed? How do I make sure my sata hard disk is working at 6Gbps speed and how do I verify this on a Linux server running on HP or IBM amd64 hardware?
[click to continue…]