Tag Archives: Bash

Manipulating Files Using Terminal Commands

CentOS 6.4 Here’s a few very quick and basic commands to do things with files via the terminal. These can be vastly improved upon; please comment if you have better methods for this. Basic commands 123456// view the first 25 lines in a file $ head -25 filename.sql // view the last 25 lines in […]

Coloured & Named Terminal Prompt On CentOS

CentOS 6, Bash If you are like me, you might have 3 SSH sessions open in your terminal window at the same time. Flicking between them and hitting up twice and then return could be disastrous on the wrong window! I’ve been there before 🙁 So, here’s a little trick to colour the output of […]

Server Memory Usage Bash Script

Linux, Terminal I wanted a simple script to show me the memory usage on my CentOS 6 server so we could monitor peak traffic and usages. This is easily configured but very useful. Just call the script using cron and make sure it is executable! I call it every hour and overwrite it every week, […]