Category Archives: System

PHPHOST BLOG

Web Hosting Related Articles You May Need

Prevent Ubuntu from asking a password after resuming from Hibernate or Suspend

When you close the lid of your laptop and Ubuntu is running, the computer goes into Suspend mode. Same goes for chosing Hibernate from the shutdown menu, when the laptop goes into deep sleep and consumes less power. When resuming from these two states, Ubuntu will ask you for your password. If you’d like to […] Continue reading

Posted in GNOME, Security, Syndicated, System | Comments Off on Prevent Ubuntu from asking a password after resuming from Hibernate or Suspend

Make that last command into a Linux script

You have been trying combinations to see which command line options best fit your needs, and you’ve finally found it. Now let’s make that into a script. You could revert to the last command using your Up key, copy the string, create a new file, paste the string, save the file. Or you could simply […] Continue reading

Posted in cli, Syndicated, System | Comments Off on Make that last command into a Linux script

Leave no traces in your .bash_history file

If you wish to not leave traces of your CLI activity in the .bash_history file, you can exclude the logging of certain commands by appending a space character before them. For example, press the space bar before you type cat /etc/passwd:
<space>c… Continue reading

Posted in cli, Security, Syndicated, System | Comments Off on Leave no traces in your .bash_history file

Monitor your changed files in real-time in Linux

Everybody knows top or htop. Ever wished there was something similar but to monitor your files instead of CPU usage and processes? Well, there is.Run this: watch -d -n 2 ‘df; ls -FlAt;’ and you’ll get to spy on which files are getting written on your system. Every time a file gets modified it will […] Continue reading

Posted in cli, Security, Syndicated, System | Comments Off on Monitor your changed files in real-time in Linux

Take a screenshot of a remote desktop in Linux

If you want to take a screenshot of a remote Linux desktop, all you need is to change the command below to match the remote desktop you wish to take a screenshot of:
DISPLAY=”:0.0″ import -window root screenshot.png

Continue reading

Posted in cli, Syndicated, System | Comments Off on Take a screenshot of a remote desktop in Linux

Use locate across external devices in Linux

By default, updatedb indexes only your root partition when run. To be able to extend locate’s reach and get updatedb to index external devices such as USB harddisks and flash drives, edit the /etc/updatedb.conf file. Modify the following line:
PRUNEPATHS=”/tmp /var/spool /media”
so that it reads
PRUNEPATHS=”/tmp /var/spool”
This adds the devices mounted in the /media directory to the […] Continue reading

Posted in cli, Database, Syndicated, System | Comments Off on Use locate across external devices in Linux

Take screenshots from the command line in Linux

There are many Linux applications dedicated to taking screenshots. However, you minght want to use the command line to do this, either because you want to build an automated script, or because you have a terminal screen handy.Try
import screenshot.jpg
This will allow you to select a rectangle using your mouse. The moment you let go […] Continue reading

Posted in Applications, cli, Syndicated, System | Comments Off on Take screenshots from the command line in Linux

Realtime statistics of your Linux system

If you wish to monitor your Linux system in realtime, use dstat. Use a man dstat to see a list of possible options, since they are extensive and dstat can output system usage, memory usage, load times, network information, NFS, therman, VMWare, CPU, sendmail and MySQL usage, among others.Try
dstat -tamn -M topcpu
where -tamn stand for […] Continue reading

Posted in cli, Database, Hardware, networking, Syndicated, System | Comments Off on Realtime statistics of your Linux system

Linux – Top 10 CPU-hungry apps

If you want to find out which applications you run eat the most of your CPU, run the command below:
ps -eo pcpu,pid,args | sort -k 1 -r | head -10
This will display a top 10 list of those processes, starting with the hungriest at the top. Continue reading

Posted in cli, Syndicated, System | Comments Off on Linux – Top 10 CPU-hungry apps

Find duplicate files in Linux

Let’s say you have a folder with 5000 MP3 files you want to check for duplicates. Or a directory containing thousands of EPUB files, all with different names but you have a hunch some of them might be duplicates. You can cd your way in the console up to that particular folder and then do […] Continue reading

Posted in cli, Syndicated, System | Comments Off on Find duplicate files in Linux