Saving files in memory

If you need super quick access to a file, for example a log file which isn’t going to be too big but it being used by a script which is time critical, then rather than writing it to disk, you can mount part of your file system in memory and write to it there.

This has the disadvantage that when you restart your system, you will lose the data. But for test scripts, logs or other temporary files that you don’t mind getting lost, it can really speed up performance.

Luckily, most systems come with a an area mounted in memory already – so you don’t even need to configure it!

cd /dev/shm

If said directory exists, you’ll have a memory mounted directory already and can start using it immediately.

Installing new memory

Unpack the RAM (random access memory) and check with the motherboard’s manual to work out which is the first slot (slot 0). When you insert the memory you want to fill it up numerically: 0, 1, 2, and so on.

To insert the memory push the white clips at the end outwards then simply slot in the memory sticks into the slots. The clips will automatically lock back into place when you have pushed the memory stick far enough into the slot.