search
top
Currently Browsing: Linux

How to set a Directory Sticky Bit in Linux

There are times on Linux / Unix that you need to set the permissions on a directory so that only the owner and root can delete / rename files or sub-directories in the directory. This is true by default with the /tmp directory. This is commonly referred to as the sticky bit. If you want to keep the permissions the same on the directory and just add the sticky bit you can do this by using the chmod command... read more

How to lock down files in Linux using chattr

As system admins there is always a few trouble users that keep changing files we don’t want them to, such as /etc/resolv.conf. We can do that using the chattr command. Here is the file with no flags using the lsattr command. lsattr – list file attributes on a Linux second extended file system $ lsattr resolv.conf ————-e- resolv.conf So lets lock down the file using -i... read more

How To Disable fsck at boot on RHEL

Recently ran into the need to disable fsck on a large filesystem at boot. This is not recommended to do by RedHat but in this case it was a evil that had to be put in place with the caveat of making sure to manually run fsck at a later time. According to RedHat: Red Hat does not typically suggest disabling the on-boot fsck except in situations where the machine does not boot, the file system is extremely... read more

How To Print Directly To PDF in Fedora 17

Admit it, you know you like PDF format, it is portable and the reader is available everywhere it is convenient to have your go to docs in the format. I do it all the time for those commands and programs that I cannot remember the details. No matter what OS I am using I always like the ability to print directly to PDF for sending and storing information. With Windows systems I am a fan of PDFCreator but... read more

Gathering System Statistics for Linux using SAR

You know how it happens, you are working on a killer bash script and all of the sudden your manager is standing at your cube asking you to look at slow performing server. It happens all of the time, but luckily we have many tools at our disposal and one such tool is Sar. If you are needing I/O, CPU stats and other data from today or several days back, then sar is the tool to use for Linux. If you are... read more

« Previous Entries Next Entries »

top
Life of a Geek Admin
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.