The “tmpwatch ” command in linux is to removes files which haven’t been accessed for a period of time. The tmpwatch recursively removes files which haven’t been accessed for a given time. Normally, it’s used to clean up directories which are used for temporary holding space such as /tmp.
If you are noticing “/tmp” getting overloaded with files and not sure which files/folders to delete – you better use “tmpwatch” to cleanup or delete files/folders from the “/tmp” directory.
You’ll need SSH root access to install tmpwatch and add it in the cron. If your server is inaccessible due to “/tmp” getting full – you may restart the server and that should free up some space after reboot.
- Login to the server as root using SSH
- Run the following command:
#yum install tmpwatch -y
- To delete temporary files (for example after every 12 hours) run the following command:
#/usr/sbin/tmpwatch -am 12 /tmp
- The next step is to configure tmpwatch to run automatically through a cron. To do that type the following command:
- The above command will open the cron job list for the user root. Now go to the bottom and add the following line and save the file:
0 4 * * * /usr/sbin/tmpwatch -am 12 /tmp
If you are unable to add the above line, you may navigate to “/var/spool/cron” and open the cron file “root” with a text editor (such as, vi, nano). Add the line at the bottom and save the file:
0 4 * * * /usr/sbin/tmpwatch -am 12 /tmp
Check the usage of “/tmp” and it should be clean by now.
It is possible that you might like a favicon (yes the logo icon that is displayed in the browser tab) of a certain website. Now, normally most of the websites store it in the form of favicon.ico in the root directory of any website. So, you can just type in: http://domain.com/favicon.ico and download it when it appears in the browser.
But, not all the websites store it this way. If you find it hard – let it be done by Google. Just type in the following link in the web browser – and it will show you the favicon.ico:
To get the favicon for a domain, use
To get the favicon for an URL, use
Replace domain.com with the actual domain from which you’d like to download the favicon from.
While everybody is busy getting their website more and more exposed to the search engines (SEO) – you might want to restrict search engines to crawl your website.
You may have your own development website or may have your company’s web based HR system – which you don’t want to expose to the world. Search Engines will find your website if you do not restrict them. If you want to restrict the complete website just upload a file named “robot.txt” in the root folder and add the following line in it:
If you want to restrict a specific part (files in a specific directory) – add the following line:
If you want a certain Search Engine to be restrcited – (for example Google): add the following line:
Some of the other Search Engine Bots are as follows:
Yahoo: Yahoo Slurp (Currently using bingbot).
Baidu: Baidu Spider
You’ve purchased a Cloud server or a Virtual server. The server provider says it comes with an SSD (Solid State Drive). Now you definitely would like to verify whether the storage is indeed SSD or is it simple HDD (Hard Disk Drive). If you’re server is running on any version of Linux OS (kernel version 2.6.29 onwards) – just run the following command:
The result will be Either 1 or 0 . If it is “0” – Congratulations – your storage is indeed an SSD one and if the result is “1” – your storage device is an HDD.
I ran the above command in one of my VPSs. The result is “1” – that is the storage device used here is an HDD.
I recently encountered a problem with a Joomla website which had VirtuMart in it. I moved the whole joomla site from a demo server to an active server with the actual domain pointing to it. Everything worked fine as I did the required changes in the configuration.php of the joomla folder. But the VirtueMart component was still pointing to the old demo server path. I then googles a bit and found a very good solution. I changed the config file of the virtuemart component located at:
The following two paths need to be changed with the new path:
- define( ‘URL’, ‘http://demoserverURL/joomlafolder/’ );
- define( ‘SECUREURL’, ‘http://demoserverURL/joomlafolder/‘ );
Instead of the “demoserverLink/joomlafolder” use your actual joomla folder link.
You might face a new problem while doing this. If you are using ftp to download the file “virtuemart.cfg.php” and re-upload it with the changed path, you may get an “Permission Denied” error. There is a good solution for this too. Install a joomla component named “Extplorer” or “JoomlaXplorer“. This component is a joomla admin panel component that gives you the power to upload/delete/edit files in the joomla site. After installing any one of these two components just browse through the file and edit the above mentioned two lines of the “virtuemart.cfg.php” file.
I could get rid of the problem this way, I hope the solution will be useful for anyone facing the same problem.
1.Type “about:config” into the address bar and hit return. Scroll down and look for the following entries:
Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.
2. Alter the entries as follows:
Set “network.http.pipelining” to “true”
Set “network.http.proxy.pipelining” to “true”
Set “network.http.pipelining.maxrequests” to some number like 30. This means it will make 30 requests at once. (Max can only be 8, but people report 30. The 30 open connections is incorrect)
Set “browser.turbo.enabled” to “true”
3. Lastly right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0”. This value is the amount of time the browser waits before it acts on information it recieves.
4. FOR XP USERS SEEKING FASTER FIREFOX LOADTIMES: Within the Firefox “shortcut” icon properties add /Prefetch:1 (outside the quotation marks) of the ‘target. For example: my target is “D:Program FilesMozilla Firefoxfirefox.exe” /Prefetch:1
Chk dis out it really works
Source: NSUers Online Community
Recently I encountered a problem with cmd.exe . Yes, I am talking about the command prompt that we get by typing cmd.exe and pressing enter in the “Start”->>”Run”. The error was something like “Windows couldn’t find cmd.exe”. I was annoyed and remembered that the recent virus attack affected a lot of files and cmd.exe could be one of them.
But when i typed “tracert hasibul.info” in “Start”->>”Run” to traceroute my site, I found that the command prompt appeared and it was trace routing. Atfirst I thought that cmd.exe probably was there. But l found that some of the options are not working. For example copying text from command prompt by right clicking and selecting “Mark”, “Copy” or “Paste” etc. Later I found that it was not cmd.exe rather it was command.com .
CMD.EXE is the command prompt for windows XP whereas COMMAND.COM is the command prompt of the DOS which is still there in Windows XP. Comman.com supports many commands of DOS which CMD.EXE doesn’t support. But still when CMD.EXE was absent in my PC i could do the needful with command.exe .