How To: List USB Devices

Today’s article might look like a funny headline, where the subject would be how to list USB devices. Today, we’ll have a relatively short article. It’s not complicated and you’ve already learned how to list USB devices! Wait-a-minute!

After all, you’ve already been told how to do this. In fact, I’ve written an article on this very subject! See:

A Little About The ‘lsusb’ Command.

That article covered how to list USB devices, using the lsusb command. Right?

Yes. Yes, it did.

But, this is Linux and there’s another command that doesn’t get enough attention. In fact, I’d wager (a small amount) that many of you wouldn’t have used this command before. 

What is this mystery command? It’s really easy to remember. It’s not complicated, it’s simply “usb-devices”. On the man page, the command describes itself as:

usb-devices – print USB device details

Sure enough, that’s what it does. But, unlike the ‘lsusb’ command, this command spits out a whole lot more information by default. There’s not a whole lot more to say about it, and I’m making this article extra short. So…

List USB Devices:

As implied in the opening part of this article, you’re going to need an open terminal. 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, simply run the command:

If you check the man page, you’ll find that that’s it. There’s nothing special to do with this command, you just run it. The man page contains this:

usb-devices is a (bash) shell script that can be used to display details of USB buses in the system and the devices connected to them.

It might be the easiest command you’ll ever run – and it’s also easy to remember. So, why is it so unknown? Well, we use ‘lsusb’ for listing USB devices and the command doesn’t rank well in search engines, but it’s at the bottom of many such articles. It also doesn’t do much more than list USB devices, as it’s just some sort of a built-in bit of shell scripting.

Closure:

So, I figured I’d do an extra short article today. Why not? We’ve done some longer articles lately, so we might as well try the super-short format. It helps that I didn’t dive off-topic or the like, but simply explained how to list USB devices. Do you have any thoughts on articles in this shorter format?

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.

 

How To: List Open Files

Today’s article might seem unimportant and that’s okay because we’re just going to examine one way to list often files. So, in a way, it’s probably not all that important. If you are someone who wants to list open files, this would be the article for you!

For the most part, most of my readers aren’t going to want to know how to list open files because they just have no good reason to do so. It won’t be a very long article or anything. I did some long-format articles and they didn’t get much feedback. I’ll do more, but I don’t see them as needing to be all that immediate – or consistent. The shorter articles just seem to be what folks are looking for. I can live with that. (If you do like the longer articles, it’s not too late to mention that.)

Today’s tool will be one you may have never heard of. We’ll be using the right tool for the job, however. That tool will be the ‘lsof’ command. The ‘lsof’ command should be installed by default in any major distro and checking the man page will reveal that it describes itself like so:

lsof – list open files

Read that line and then look at the headline. See? I told you that it was the correct tool for the job. If you want to list open files, a tool that lists open files is the tool for the job. Imagine that?!?

List Open Files:

Of course, the lsof command is run in the terminal. As such, you’ll need an open terminal for this exercise. 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 open, you can just run the following command which will show every currently open file (it’s a lot):

You’ll notice some of the output will say something about “permission denied”. So, if you’re going to list all the open files, you probably should use sudo with the command. Like so:

Type in your password at the prompt and be prepared for the deluge of file names. It takes quite a bunch of open files for an operating system to work – and Linux treats everything like it’s a file.

So, what if you just want the output to tell you all the files opened by a specific user? The lsof command will help you out with that. Try this command:

For example:

That command will show you all the files opened by that user. It’s still a lot, but it’s an easier output to process. If you wanted to show the files opened by everyone except a specific user, you’d use this command:

That command would (assuming you removed the brackets) show you all the open files except those files opened by ‘username’. In any of these cases, if you see some permission denied errors you can just slap sudo on the front of it and be good to go.

Closure:

Well… If you’ve ever wanted to list open files you now know how to do so. I suppose it’d mostly be useful for things like auditing or troubleshooting performance issues. I have the command in my book of tricks, but I don’t recall ever needing to use it for much. I’ve played with lsof and it does list open files. So, there’s that.

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.

How To: Unzip All The Files In A Directory

Today’s article might seem like a strange one, but it’s all about how to unzip all the files in a directory. It’s something only a few folks will need to know and something you may not need all that often. However, those folks who need to know this, and those folks who need this often, will be grateful to learn this little tip.

I would think that this will be a short article, as I don’t see it taking up that many words. I’m not sure of the appeal, but I want to write it anyhow. So, if you want to know how to unzip all the files in a directory, this is the article for you!

For me, this is another article based on necessity. See, it’s I who frequently has to unzip a bunch of files all at once. They’re fortunately all in the same directory, making this just a pair of easy commands. Sometimes I have to unzip nested files, so I’ll include the command to do that along with the more simple command that I usually run.

Every month, I get a whole lot of documents from my accountant. For bandwidth’s sake, these get organized and compressed before they’re emailed to me. In theory, I’m supposed to go over them and verify them individually. At best, I open them all up and look at a few of them. I do a sanity check every few months. My accountant is an old lady and I’m pretty confident in her integrity. So, I’m pretty lax…

However, see, I’m supposed to check them… So, I kinda go through the motions and at least look at a few of the documents. That’s where this command comes in…

Unzip All The Files In A Directory:

For those following along, it has been a minute since you needed to open a terminal to follow one of these articles! Well, that wait is over! You know what to do. Otherwise, just press CTRL + ALT + T, and your default terminal should open.

With your terminal open, use the cd command to navigate to the directory that contains multiple .zip files. You should know how to do this, but it’s just: 

Once you have reached the directory you’ve chosen, you can just run this command to unzip all the files in a directory:

Now, sometimes there will be folders inside that directory and those folders will also contain .zip files. To unzip the files recursively you’d just want to use the following find command first, like so:

That lovely command will scour the directory you’re in for sub-directories, enter those directories, and then unzip any files it finds in those sub-directories. It’s not all that complicated, you’re just finding files with .zip in their name and then executing the unzip command on them.

As I said at the start, it’s not one of those things you’ll need often – but when you do need it, you need it. Well, your life is significantly improved by it. I suppose it’s not technically a necessity. You could unzip all the files one by one or even unzip them using a GUI. Still, it’s handy to have.

Closure:

And there you have it. Today’s article is back to a shorter format article, largely because this is what I was thinking about today. Because of that, you got an article explaining how to unzip all the files in a directory – and how to do so recursively – unzipping files nested in sub-directories. You’ll eventually need it! Maybe…

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.

How To: Use An Older Version Of A Google Chrome Extension

Today we’ll cover a not-so-serious topic about how to use an older version of a Google Chrome extension. There’s a subset of my readers who may eventually want to know this information. It might not be today, it might not be tomorrow, but someday you may need this information. 

Fortunately, that information will be right here in an article about how you go about using an older version of a Chrome extension. This is one of those things you don’t need – until you need it. It’s kinda like how I answer kids who ask if I have any good life advice; “But a plunger before you need a plunger.” It’s pretty solid advice.

The gist of the story is that I live in a very remote area. I also live where weather events are (and this is not in jest) sometimes fatal. If you’re unprepared for the cold, it can kill you. Of course, it’s unseasonably warm right now – but that doesn’t change the point.

So, I take the weather a bit seriously. One of the tools I use for cursory weather examination is a browser extension called “Forecastfox.” The extension relies on AccuWeather and folks have determined that it’s an API change that broke the extension. Also, to make it a bit more interesting, the author of the extension is in Ukraine.

It could be a while before it is fixed and operating properly. Fortunately, and for whatever reason, the previous version was known to still work. Unfortunately, it is a bit of a hit-and-miss, but it’s sometimes possible to get an older version of a Chrome extension. It’s then easy enough to install it, which is what this article is all about.

Use An Older Version Of A Google Chrome Extension:

When you find a Google Chrome extension (and this applies to Chromium, Opera, Brave, Edge, and all the other Chromium-based browsers out there) that doesn’t work anymore, you have some options. You can try a previous version, an older version, to see if that still works as expected.

Unless it’s a security extension, or unless the extension had a security-related flaw, it’s reasonable to try an older version of the extension to see if it works. In my case, I did a bit of research before choosing this route – and I’d advise you to do the same. Make sure the update was just bug fixes and feature additions and that you’re not reverting to an extension with known security issues.

Once you’ve looked around and determined that using an older version of the extension is a good idea, you can get to work on using an older extension version. You’ll want your browser open for this. In this instance, we’ll be using Chrome.

Your first real step is to click the three-dot menu in the upper right. Then, open “More Tools” and click on “Extensions”. In the upper right, enable “Developer mode”. It looks like this:

Enable developer mode in Google Chrome.
Have you ever wondered what this switch was for?

With that enabled, your next step is to find and download an older version of the extension. Be sure to remove the existing version before going any further. Additionally, leave that extension page open because you’re going to need it again.

Now to find an older version of your extension. Start by searching here:

https://www.crx4chrome.com/

That site has a whole lot of extension versions backed up. Odds are very good that you’ll find an older version of your extension there. If you don’t find one, you can try going to the extension’s home page or checking code repositories like GitHub. For example, if it’s on GitHub, just look to the right sidebar to find the releases link and look in there.

Once you have that file (it should be a string of letters and numbers that end in .crx) just drag it to your Google extension page. There’s nothing fancy, just left-click on the .crx file and drag it to Chrome’s open extensions page.

That’s it. It’s that simple.

As you manually loaded the extension you shouldn’t need to worry about it updating automatically. It shouldn’t automatically update until you’ve installed the current version from the store again. So, you’re good to wait for a version or two with your working extension. Then, once you’ve determined the current version works, just remove the extension you manually added and install the version from the store.

See? You’re done!

For Our Firefox-Using Friends:

If you use Firefox add-ons, I did look up how to do the same thing with Firefox. It’s much easier to do this with Firefox. I don’t use Firefox all that often anymore, but I figured I’d learn how to load an older add-on and share that information with you. 

If you’re a Firefox user, you’ve got it easier – mostly…

Your first step is to click the three-line menu, where you’ll select “Add-ons and themes”. Open up the add-on’s settings so that you can remove the extension. After you remove the add-on, leave that tab open because you’re going to need it again.

Once you have the add-on removed, find the add-on’s home page on the Mozilla Add-On site. Look on the left and scroll down. You’re looking for “More information” which should have a “See all versions” link. Click on that and download an earlier version. It’d look something like this:

click that link to download older versions of firefox add-ons
It’s not too hard to find. Click it. You’re almost all the way there!

On the next page, scroll down to find the add-on’s older version, the version you believe will still work. It’s a bit uninformative, but just click the older version’s download link on the right and it will download it and ask if you want to install it. Of course, you’ll pick yes to install it.

Now, go back to the tab that you were using to show your add-ons. Find the extension you just added and open up its properties (it’s ‘Manage’ under the three horizontal dot menu). Scroll down to find “Allow automatic updates”. Click on “Off” to disable automatic updates so that it doesn’t automatically update your add-on to the newest version.

When you are reasonably sure that the current version of the add-on will work with your system, you can just enable automatic updates. That should do the trick but will take time as it’ll just update when it next checks. You can simply remove the add-on and add the current one after that, should you be in any sort of hurry.

And, for you Firefox users, that’s it! That’s all you should have to do if you want to use an older version of a Firefox add-on. It’s not too taxing, now is it?

Closure:

Alright, so it’s another long article – and another one that doesn’t require an open terminal. This time around, we’ve talked about how to use an older version of a Google Chrome extension. I also covered how to do so with Firefox. Ordinarily, I’d have considered making these two separate articles, but I figured you could handle another long piece. 

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.

Dealing With Google Chrome Crashes, Freezes And Other Anomalies

Today’s article is about dealing with Google Chrome crashes – and other anomalies. I say ‘other anomalies’ because this helps with many problems. It’s such a common answer for browser-related questions that it’s hard to make this into a succinct article.

See, this is one of my most-voted answers on a support site. But, it’s a valid answer for so many different problems. I’ve long wanted to make this into an article, I just haven’t been able to come up with the words to write that article.

So, if you installed a Google Chromium-based browser (such as Google Chrome, Brave, Opera, Microsoft Edge, or others) then the odds are very good that it came with “Hardware Acceleration” enabled. As a general rule, this doesn’t cause any problems.

However… See, hardware acceleration (that is rendering some content on your hardware instead of doing so in software) isn’t supported and Google has no plans on supporting it. But, for whatever reason, Chrome, Chromium, and all the derivatives ship their Linux version with hardware acceleration enabled.

Having hardware acceleration enabled is, more often than not, nothing to be too concerned about… This article is for when it is a problem. This article is for that subset of users who don’t know to turn it off and don’t realize it’s the problem.

Does your system freeze after leaving your browser open for a while?
Does your browser freeze for no reason?
Does your browser freeze when you play audio or video?
Does your system slow down with just a few tabs open?

The list of symptoms is just too long to make a single headline, even though the fix is simple enough. I’ll show you…

Dealing With Google Chrome Crashes:

So, if you have any of those symptoms listed above, the solution is pretty easy.

I’d go so far as to say that if you’re experiencing problems while you have an instance of Chrome, Chromium, Bing, etc, installed, then the first step I’d take in debugging would be the one that follows.

The answer is simply to disable hardware acceleration. 

Open the offending browser and then it’s under Settings > Advanced > System and it looks like this:

solve the google chrome problem easily
Yup. Just un-tick that bugger and reboot. It’s that simple.

Restart your browser so that the changes take effect.

That’s usually what fixes this. That’s it. That’s all you need to do.

This fixes so many weird problems that it’s worth trying if you’re experiencing weirdness while you have a Chromium-based browser running. If it doesn’t resolve your problem, you’ve not spent a bunch of time on this fix. It’s also trivial to reverse if you want that for some reason.

Closure:

There you go, it’s another article. This time, it’s about Google Chrome (or based on Chromium) based browsers – which, in the Linux world, means said browser is likely Chrome and Chromium, according to the stats I see. Also, this article didn’t even require opening a terminal

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.

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