How To: Find A Site’s Nameservers

Today’s article will be a fun and easy one if you already understand nameservers, as I will be explaining how to find a site’s nameservers. If you don’t understand nameservers, it may be a bit more difficult. But, I’ll do my best to make it approachable. So, to learn how to find a site’s nameservers read on!

Okay, so what are nameservers?

Hmm… Let’s try to explain it in the most simple way possible… 

DNS is like a phone book. You look in the book to see which number (IP address) to connect to. However, just like in the real world (though less common with cell phones) a given telephone number may belong to multiple people.

Nameservers help to organize those DNS records. Using the nameservers is sort of like calling a phone exchange and then entering a party’s extension number to go directly to that person.

Does that make sense? No? Well, that’s the best you’re getting. I suck at analogies unless they’re automotive-related and I can’t come up with one that makes sense. I’m pretty sure the above was how it was first explained to me, or something like that. Ah well…

It should be pointed out that I used ‘dig’ in the previous article. We’ll be using that again. This time, we’ll be using dig to find a site’s nameservers instead of the site’s IP address. We might as well learn about it now, while the dig command is fresh in our memories!

Find A Site’s Nameservers:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, the syntax for finding a site’s nameservers is as follows:

Or, if you prefer a shorter output, you have:

Like the previously used dig command, you can actually put the flags at the end (if that’s something you feel like doing). It works just fine like:

If we use this site as an example, the outcome of the latter command should look something like this:

using dig to find a site's nameservers
And there you see them, this site’s nameservers as shown by dig. Pretty easy, huh?

As you can see, nameservers look just like domain names. You’ll also note that those (shouldn’t) don’t change, unlike the site’s IP address. As we’re using a CDN, there are a number of possible IP addresses. The nameservers will be the same no matter what part of the globe you connect from.

Of course, there’s more to the dig command. We’ve just touched on a couple of uses. Check the man page with man dig to find out what other options are available.

Closure:

Well, there you have another article. Once again, we’ve used dig in this article. I figured we might as well have another dig article while I was thinking about it, and this time we used dig to find a site’s nameservers. Hopefully, this will be useful for you at some point in your Linux journey. As I deal with a bunch of websites, it’s important for me to know my nameservers and to know when they’ve propagated (something for another article).

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Search For Files By Name

Today’s article isn’t going to be all that complicated, as we’re just going to cover one way to search for files by name. It is a pretty useful skill to have, and a skill that one should probably learn early on. If you want to learn how to search for files by name, read on!

So many of us will parse the output of the ‘ls’ command, but you really shouldn’t parse the output from ‘ls’. Sure, it’s nice and easy to use something like ls -la | grep <filename>, but that’s a bad idea for reasons better explained by clicking the above link.

One of the options you can use instead of ‘ls’ would be the ‘find’ command. We’ve used it a few times before, but this time we’ll be using it to search for files by name. It’s relatively easy and I’m sure you can figure it out. The find command’s man page defines itself as:

search for files in a directory hierarchy

Which is a good description, because that’s what it does. Which is also good, because that’s what we want it to do! So, let’s get this article started rather than wasting time in the intro…

Search For Files By Name:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, the command you’re looking for would look a little like this example:

As you can see, you must declare a directory and a file name. If you want some level of leeway, you use ‘-iname‘ which indicates that it isn’t case-sensitive. As a matter of habit, I use ‘-iname‘ instead of ‘-name‘. This works for me and we’ll use ‘-iname‘ from here on out.

Let me give you an example…

Say you wanted to find the ‘firefox.desktop’ file and ensure it’s there. You could use this command:

Of course, if you aren’t sure it’s a desktop file, you can use:

The asterisk means anything, so you’ll get results for firefox.desktop as well as anything else.

If for some reason, you wanted to search your entire system for anything containing firefox, it’d look like this:

That’ll likely throw a whole lot of errors, as you don’t have permission to look in those areas, so you just add sudo to the command:

Which should show you every instance of a file starting with firefox on the entire computer. The ‘find’ command can seem pretty difficult to tackle for a new person, but if you take it in small bites you’ll start to learn that it’s not all that complicated. Be sure to check man find for more details.

Closure:

There you go… It’s yet another article. This time, we’ve covered how to search for files by name, a task that you may do with some frequency. If you know what you’re doing, it’s possibly faster than rooting around in a GUI hoping you find the right directory.

You don’t even need to know the entire file name to at least narrow it down a great deal. So, it’s a great tool to add to your toolbox and is more reliable than parsing the output of the ‘ls’ command.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Meta: The State Of Linux Tips #15

Today’s article is just a meta article, one where we cover the state of Linux Tips (this site). It’s just a chance to sit down and share what’s going on with the site, a chance to not write something technical. So, for another meta article, read on!

This will be mostly about the month of February. See, I didn’t write any meta article(s) in February. It just didn’t cross my mind and it was a shorter month than the months surrounding it. So, I suppose, this will be about February.

I try to write these meta articles once a month, but they’re never really formally scheduled. They just get written when I remember to write one and when I have the urge to do so. I should probably pick a specific day of the month and write them on that day, but where’s the fun in that?

So, about February…

The State of Linux Tips:

February only has 28 days. Because of this, Linux Tips did not have more traffic than the month before. If February had been 29 days, I’d have had slightly more traffic than was had in the month of January – which has 31 days. (Traffic for this month appears to be breaking all sorts of records.)

Like always, the vast majority of my traffic came from Google. However, that number has jumped a great deal. I had about 6200 visitors from Google in the month of February. The site’s getting more and more popular, or so it seems.

In February, I had 12,655 unique visitors. In January, that number was 12,885 unique visitors. So, if February had been just a few hours longer it’d have had more unique visitors than the month prior. I’m going to put that one in the ‘win’ column!

Google’s definitely taken me out of the doghouse, but the ad clicks are worth less than they used to be before they put me in the dog house. Amusingly, this coincides with my CDN deciding the amount I had been paying is an ‘introductory rate’ and will be doubling the cost. I bought a bunch of credits, hoping that they’ll still be worth the same as they are now.

That’s not actually a complaint. They provide a great service and the cost isn’t that much. I know, I ask for donations and I have ads, but the reality is that the site will remain online for the foreseeable future.

The expenses aren’t so great that I can’t handle them. If they ever do become more than I’m willing to pay, I’ll be sure to let folks know and let folks decide how much they value the site. But, really, don’t worry about it all that much. We’re good!

Some Linux-Tips Numbers:

Hmm… How about the three articles AWstats tells me had the greatest traffic numbers?

Find Out Which Display-Manager You’re Using
Screenfetch vs. Neofetch, You Decide!
How To: Restart TeamViewer From The Terminal

That’s a bit interesting, as here’s what Google says were my top 3 pages:

It agrees with the #1 slot.
The #2 slot (according to Google) is the TeamViewer article.
How To: Stop, Pause, and Resume Processes Running in Your Term

But, Google’s not very good with counting traffic. Google seems to me to not count anyone that doesn’t allow the Google cookie. So, if you’re blocking ads appropriately, you are also probably blocking the cookies from the blocked sites. That means Google isn’t very good at counting traffic.

For example…

According to Google Analytics, my monthly visitors for February was a total of ~4800 people. (That’s pretty amazing, as the previous month was like ~4200.) It does say that I was in the search engine results some 365k times. But…

In reality, I had almost 13k unique visitors and a total of ~17.5k total visits.

So, for all the complaints about Google tracking people, they’re not very good at it. Also, they really suck at figuring out what kind of ads I’d like. I’m not allowed to click on them, but I do see them. They’re seldom for anything I’m interested in.

Still, you should whitelist this site and Google wants you to only click on ads that are of legitimate interest to you. Don’t just click ads to be nice. I appreciate that, but it’ll just screw me over in the end. As it is, Google loves to call clicks invalid for reasons I do not know.

Closure:

There’s still a lot going on here. There’s still more articles to write. I could use a bit of a break now and again, so speak up if you’re wanting to write an article for the site. (And you’re not looking to use my site to boost the ratings of unrelated sites, of course…) 

We’ll see when the next meta article comes along, but it probably won’t be in the month of March. It could be, I dunno… Oh, and I chewed through about 20 GB of bandwidth with 5 of those GBs being gratis.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Find Linux News

Today’s article will be really easy for anyone to follow, as I share how it is I find Linux news. It’s amazing how many people don’t keep up with any Linux news. Read on, as this is sure to be a fairly short article. 

I might even speculate that most Linux users don’t keep up with Linux news. I’d speculate that it’s an even smaller group that does things like read the release notes for their updates and upgrades. They don’t read the notes about software upgrades and they don’t definitely don’t pay attention to what’s going on at the project(s) level(s).

This is too bad. There’s a lot to learn and gathering information is good.

These are the people who are then surprised by things that were covered in the release notes, just as people are surprised by changes that have been covered by the journalists. (Well, I’m going to call them journalists for the sake of this article, and to avoid unneeded complexity.)

Now, I admit that I’m not always as diligent as I would suggest others be. I can be pretty lazy. I might even move to a new distro point release without actually reading the release notes. So, do as I say, not as I do!

Or not…

Just keep up with what you want to keep up with. For the most part, you’ll be just fine. Anyhow, I am not feeling all that great and I need a quick/easy article. So, you get this article about finding Linux news.

How I Find Linux News:

Below, you’ll find some links to news sites that I use when I want to keep up with Linux news. If you have your own sites, feel free to add them as a comment below. If you want your site added, feel free to ask in a comment below and I’ll take a look.

My first stop is quite often just an aggregator. It’s not complete, but it’s useful. I’ll often visit some of their aggregated URLs in person. If you just visit one site, this is a good choice:

tuxurls.com

My next choice is a site that tends to have plenty of content. I try to catch them daily, but obviously don’t always have time to do so:

linuxtoday.com

This next choice also has a ton of content. In theory, you can comment on the stories, but there’s not a lot of community involvement in those regards. Still, they tend to have a bunch of Linux news:

lxer.com

This next one doesn’t always have the same amount of content as some of the others, but it’s usually pretty good. Plus the site is well-designed and it even looks like a proper news site:

linuxinsider.com

If you want less content, but things like tech data and well-thought-out articles that tend to be a bit more in-depth, then you would do well to consider this site long-lived Linux news site:

phoronix.com

This next site tends to have some good content – and it’s reader-supported. As such, you will find there’s some decent commentary here. If you don’t know what to think about an article, you can head to the comments and someone will tell you what to think! See:

lwn.net

There are more but this is the final one I’ll list. I know, not everyone likes Google. But, their news section is usually pretty good at finding Linux news that might not have been covered elsewhere. I actually tend to check this one fairly frequently. The link should work for you, regardless of where you live:

news.google.com/search?q=Linux

So, those are a few of the places I go to for news. You should also consider finding your distro’s news outlet (often a blog of sorts). There you can keep up with distro-specific things and find stuff like release notes. You should be able to find that on your own.

Closure:

There you have it, you have another article. This time, we’ve seen a few of the places I go to when I want to find Linux news. I try to keep up with a bunch of it, and some subjects interest me more than others. If nothing else, you may want to consider keeping up with the news published by the distro you’re using. You’ll know more and not be surprised when changes happen.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Let’s Let AI Write An Article About ‘sed’

Today’s article is going to be about ‘sed’. However, I’ll be letting AI write it, just so we have an excuse to play with ChatGPT. I love new tech and I’m going to go against the advice given and just post the resulting article directly. 

Also, I picked ‘sed’ as an article topic because it’s a pain in the butt to explain even the basics. It’s such a powerful tool that knowing where to start can be tough. As such, I’ve decided it’s a perfect article for testing AI. I will only be formatting the suggested article.

Hey, it was this or write a meta article. I hadn’t written one for February and this will be the last article in February. Not much had changed, though we did cross some milestones, and I figured this article would be even more interesting to my readers.

Again, if there are errors, I am not to blame. I am posting the entire output after asking ChatGPT to write the article. I am only editing for the format. So, read on to see how AI is coming along. Hint: It’s doing well! It’s coming along nicely!

About ‘sed’:

“sed” is a stream editor in the Unix-like operating systems. It is used to perform basic text transformations on an input stream (a file or input from a pipeline). The sed command reads the specified files, or standard input if no files are specified, and applies the transformations which have been specified.

The syntax for using sed is:

Where OPTIONS can be any of the options available in the man page and COMMANDS are the instructions that tell sed what transformations to perform on the input.

One of the most common uses of sed is to replace strings. The basic syntax for string substitution is:

Where old-text is the text you want to replace, and new-text is the text you want to replace it with. For example, to replace the word “apple” with “banana” in the file “fruits.txt”, the following command could be used:

You can also use regular expressions in the old-text argument to match a more complex pattern. For example, to replace all occurrences of “apple” or “Apple” with “banana”, the following command could be used:

Another common use of sed is to delete lines. To delete a line, you can use the d command. For example, to delete the first line of the file “fruits.txt”, the following command could be used:

To delete multiple lines, specify the line numbers separated by a comma. For example, to delete lines 1 to 3 in the file “fruits.txt”, the following command could be used:

sed also supports multiple commands in a single execution. Simply separate the commands with a semicolon (;). For example, to delete the first line and replace “apple” with “banana” in the file “fruits.txt”, the following command could be used:

In addition to the commands mentioned above, there are many other powerful commands available in sed, such as inserting text, printing selected lines, and more. To learn more about these commands and other features of sed, consult the man page by running man sed in your terminal.

In conclusion, the sed command is a useful tool for performing basic text transformations on files or input from a pipeline. Its syntax is straightforward, and its wide range of commands makes it versatile enough to handle a variety of text manipulation tasks.

Closure:

There you have it. You have an article about sed – and it wasn’t written by me. So, what do you think of it? Do you think I can hang up my hat and just let AI write my articles from here on out? Do you spot any mistakes? It’s supposed to be an overview, not a complete dissertation. I think it does surprisingly well!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.