-
Recent Posts
Recent Comments
Archives
Categories
Meta
Category Archives: Linux
Stop Nano from adding newline character to end-of-file
I use Nano for all of my cli text file editing and I had always noticed that it puts a newline at the bottom of the file, but this has never bothered me much. Well today it caused me quite a headache at work, so I had to figure out […] Continue Reading
Posted in Googling for Answers, Linux
Tagged linux, nano
Debian: show a list of all packages that are to be upgraded with apt
This is a super easy one, and can easily be found in the man page, but I’ve googled it enough times that I think it’s worth including here. To see packages with available upgrades, without installing them, use the -u option: apt-get upgrade -u […] Continue Reading
Posted in Googling for Answers, Linux
Tagged Apt, debian, linux
Stop truncating your output you jerk!
The jerk in this scenario is the linux command ‘ps’. I was using it recently in a script that checks to make sure a certain process is running. Whenever I would run the command directly, I would get the desired response, a 1, indicating that the process was found. However, […] Continue Reading
Posted in Googling for Answers, Linux
Tagged linux, ps, scripting
LEMP Site Setup Script, including SFTP
Setting up a LEMP server on Debian 6 was the first post I ever wrote. The impetus for that post (and this blog) was to chronicle all the steps I took, so that I could go back later and find my answers here, instead of googling them up all over […] Continue Reading
Colored Output for ls as root
I feel like a total nubbins for this one. I’ve been messing around with linux for many years now and I’ve always wondered why my regular users had pretty color coded files and directories when using ls, but root never did. It always bothered me, and I knew there was […] Continue Reading
Posted in Googling for Answers, Linux
Tagged bash, linux
Linux Command Line Aliases
Ok, you have to promise not to make fun of me if you’re going to continue reading. You promise? Pinky swear?
Alright then, here we go. Somehow or another, I managed to avoid knowledge of command aliases in Linux for over 13 years! I’m gonna give you a moment to […] Continue Reading
Posted in Googling for Answers, Linux
Tagged bash, linux
Nginx: 502 Bad Gateway
I just recently switched from Apache to Nginx and everything seemed to be going well. However, while testing a PunBB site that I brought over, I got a 502 Bad Gateway error when trying to make a post. The strange thing was, the behavior was inconsistent. I could post in […] Continue Reading
Posted in Googling for Answers, Linux, Nginx
Tagged linux, nginx
Linux Find and Replace with sed
Have you ever found yourself googling how to find and replace within a file from the linux command line? Me too. Here’s the answer that works for me: sed -i 's/search/replace/g' /path/to/file.txt
Rather than type that command all the time, I wrote […] Continue Reading
Posted in Googling for Answers, Linux
Tagged linux
Bash Script to Show All Cron Jobs by All Users
I googled this up the other day and it's a winner for sure. The script was tagged as the best answer to "How do I list all cron jobs for all users?" over at stackoverflow.
Posted in Googling for Answers, Linux
Tagged cron, linux
Recursively chmod only Directories or Files
This particular trick is invaluable, and I’m tired of googling it. You can read the original article here.
[note color=”#DDD”]Directories Only:find . -type d -exec chmod 755 {} \;[/note] [note color=”#DDD”]Files Only:
find . -type f -exec chmod 644 {} \;[/note] And here are some other ones I […] Continue Reading
Posted in Googling for Answers, Linux
Tagged chmod, linux