Linux Tips
Site Navigation:

 
 

Linux Tips

Author:  Christophe Gevrey
Updated: [udate]

Note that the commands are given as samples, it may be possible that the paths change on your installation, in this case use the "locate" function to find the location of the missing item

Finding files by name: find /home/http/html/site/ -iname '*.htm' | grep nav_ Finding a string in files: find /path/to/start -name "*.file_extension" -exec grep "My_String" {} \; -print Stop a process by name: sudo killall processname Create a symbolic link to a directory (Linux shortcut): ln -s /home/http/html/subdir/ subdir_shortcut Adding user cri to group apache sudo /usr/sbin/usermod -G apache cri Retrieve a computer name from its IP address: host 192.168.0.1
Host 1.0.168.192.in-addr.arpa not found: 3(NXDOMAIN)

(in this case the IP is local, therefore not found...)


Display list of installed RPMs: rpm -q -a Install an RPM on Linux: rpm -ivh pine-4.60-1.i386.rpm Restarting Apache: sudo /etc/init.d/httpd stop
sudo /etc/init.d/httpd start
Apache configuration file location: /etc/httpd/conf/httpd.conf Verifying httpd.conf syntax (Apache config file): /usr/sbin/apachectl configtest

or

/usr/sbin/httpd -t Monitoring Apache Error Log: tail -f /home/http/logs/error_log Creating and entry in .htpasswd to use in .htaccess: htpasswd -cb .htpasswd myuser mypassword to be continued...