memcached
is a general-purpose distributed memory caching system
originally developed by Danga Interactive for LiveJournal but now used
by many other sites. It is often used to speed up dynamic
database-driven websites by caching data and objects in RAM to reduce
the number of times an external data source (such …
A quick one-liner to recursively search files for a given text string.
Open up a terminal session and enter the following - replacing "foo"
with the text to search for.
:::sh
find . -exec grep -l "foo" {} \;
You can also limit the search to files with a particular extension (e.g …
Sometimes things go a bit wrong. Sometimes they go very wrong. XKill is a simple little application that allows you to kill a running X application that has got out of kilter. Think of this as a quick way to get back control of your Desktop.
xkill (installed by …
On desktop setups where icons are shown on the desktop these are normally taken from the specific folder ~/Desktop. If you find you want to show icons from either your Home or another directory for a particular install/user you can do so by editing the user-dirs config file as …
Screen is a neat little program that allows you to use multiple virtual terminals in a single session on Unix/Linux and Mac. However, it does more than just that. It can also allow you to share your current session on a machine with another user - allowing you to collaboratively …
Install the latest version of Google Earth for linux direct from Google sources.
Open a terminal window to perform the installation (Ctrl-Alt-T
) then enter the following at the prompt:
:::bash
wget http://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb
You will see a progress bar as the …
Bash command substitution performs a given command replacing the marker with the resulting standard output. It is particularly useful when you want to store the output of a command in a variable or as an alternative method of chaining multiple commands together.
Bash command substitution is achieved by wrapping your …
System request (often abbreviated SysRq or Sys Req) is a key on keyboards for PCs that has no standard use. This key can be traced back to the operator interrupt key of the IBM System/370 mainframe computer. But under Linux there's a bunch of useful things available via this …
Brace expansion is one of the most powerful bash tricks with the potential to save you considerable time. Here are some common use cases.
Be careful with the use of spaces as these will stop expansion working. If you have any text containing spaces, wrap it in quotes. However, the …
Find the currently running processes on your system that were not started by yourself. A great way to find out what is hogging your system on multiple-user setups or remote logins.
Open up a terminal session and enter:
ps aux | grep -v `whoami`
ps aux
returns (a) all processes …
Often forgotten the file
command will give you a simple summary of a file's type and content.
At the prompt enter file <filename>
where <filename>
is the name of the file you are interested in.
You will receive output detailing the files contents, e.g.
A Word Document.doc: Composite …
Cinnamon is a re-implementation of the Gnome 2 desktop in GTK3 developed by the Linux Mint project as an alternative to both Gnome3/Shell and Ubuntu Unity. Here we explain how to install Cinnamon on top of your Ubuntu installation, without installing Linux Mint.
As with all Ubuntu unsupported software …
Update your session to new settings in .bash_profile without logging out and back in again.
At the prompt enter:
source ~/.bash_profile
add the following line to your .bash_profile or .bash_aliases file
alias reload='source $HOME/.bash_profile'
after running source ~/.bash_profile
the command reload
will be available to do the same …
Create your own bash pipes to send program output between shells, processes and users.
You may already be familiar with the | command commonly used to send the output of one command into another, e.g. cat /var/log/messages | less
. Here we create user-defined pipes to carry output between shells …
Re-run previously entered command as root user.
sudo !!
!!
is automatically substituted to the content of the previous command. Turning the above line intosudo <your command here>
.
Looking Glass is GNOME Shell's integrated inspector tool and JavaScript console useful for debugging.
Open the run prompt by pressing Alt+F2
Enter lg
to start Looking Glass
Commands can be entered directly at the prompt e.g. global.get_window_actors()
Exit at any time by pressing Esc
Debug Gnome Shell, or run it from the console, either for plugin development or troubleshooting.
Switch to the console using Ctrl Alt F1
Type "w" to find your display (usually it's :0.0
)
Export your display (usually with export DISPLAY=:0.0
)
Restart gnome shell from the console by typing …
Bash history expansion allows you to quickly re-run previous commands using ! and the number of the command in your history.
You can adjust the size of the history by setting the HISTSIZE variable in the shell e.g.
export HISTSIZE=1000
. You can clear the current history withhistory -c …
Interactively search through your command line history with a simple keyboard shortcut.
At a new shell prompt (bash or Terminal.app on Mac) press Ctrl-R
Start typing the search string to lookup in your bash history. As you type the top matching command in your history will appear.
Hit Return …
GNU Screen is a command-line application that allows use of multiple virtual sessions within a single real terminal or remote session. Importantly, it allows for persistent running of command-line applications independent of the shell that initiated them program, meaning active applications can persist during disconnection.
This is just one of …
While getting started using the new wp-plugins.org SVN I was looking for a quick way to download the contents of an SVN to local disk. This can be useful when doing research on methods employed by other plugins or for getting a local development copy where SVN access is …
Increasing traffic is the measure of success for a website. More visitors equals more exposure which in turns generates more income. However, if you have hosted your site on a low-end package you could get hit by excess use charges just as your start celebrating your success.
In this article …