Compress A File With WinRAR

Today’s article is going to teach you how to compress a file with WinRAR. This isn’t exactly something you’re going to do often, unless you share files with Windows users. If you do share files with Windows users, this isn’t such a terrible idea. There are worse ideas, some of which are on this site.

Before you get to excited, there are countless ways to compress a file in Linux. The odds of  you technically needing WinRAR are about zero. Still, that doesn’t mean we can’t have fun and learn new things!

Right?

Right!

It’s great to learn new things, even if you’re never gonna use them. Until about 5 minutes ago, I can’t remember the last time I felt the urge to compress a file with WinRAR. I’ve previously written about WinRAR, actually. 

How To: Extract An .rar File

So, if you follow that link you’ll learn how to perform the other end of this operation! I’d like to pretend I planned it that way, but I did not. No, there’s no rhyme or reason to the publication schedule – except you get a new article every other day.

Compress A File With WinRAR:

Yup. You’re gonna need an open terminal for this one. 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.

First, you’re going to need rar. It’s probably in your default repositories. It’s there for Debian, Ubuntu, and Mint. So, it’s probably available for you. You can get the proprietary version of WinRAR here. (Or not… I don’t see a whole lot of folks wanting that, but it’s there if you do! Also, I think it’s just a trial version.) Or, install it from your repositories. With those operating systems, it’s just:

Now, it’s really easy to compress a file with WinRAR. The command is:

The ‘a’ flag is telling the command to archive the file/folder you named. If you wanted to compress a file (or even a directory) named foo, it’d look like this:

See? That’s all you really needed to know if you want to compress a file with WinRAR. It’s not exactly complicated, but it’s helpful to know how if you come across a situation where you actually need to know. Again, there’s a zillion ways to compress files in Linux, so you’re not going to need this one all that often unless you really need it. If you do use WinRAR with Linux often, please leave a comment explaining why.

Closure:

Yup. It’s another article! This one teaches you how to compress a file with WinRAR. In my defense, this is information that’s from my notes. I have a whole lot of notes, but this one stood out today and so you get this for your article. You’re welcome!

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: Change The Timezone

In today’s article, I’m going to show you how to change the timezone. This isn’t a task you’ll need to do often, but it’ll be nice to know how to do it when you do need to change the timezone.

Personally, I find myself mostly needing to change the timezone when I lease a VPS and want the system timezone to match my own timezone. All in all, the  computer doesn’t actually care what timezone it is in, so you can set it to your local timezone and not have any issues. Normally, I’d configure the timezone during the installation process.

I suppose this is probably only going to work in systems that make use of systemd. It makes use of timedatectl and I’m pretty sure that’s a systemd thing. If this was a good site, the author would actually go verify this. You get what you pay for! Still, you may need another tool if you don’t use systemd.

It’s also going to be a fairly easy article. If you want to change the timezone, it’s not all that difficult. There really isn’t a whole lot to it. So, without further ado, let’s get into the article…

Change The Timezone:

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.

I suppose you should first know what timezone you’re currently using. To learn that information, you can use this command:

Your output might look something like this:

timedatectl output
Your timedatectl output may look different, obviously. You might not be in my timezone!

Anyhow, to change it, the format of the command is:

I suppose you might not know your timezone options. You can generate a giant list of ’em with this command:

If you don’t know your timezone options, you can use ‘grep’ to narrow it down. For example, if you’re pretty sure you’re in America, your command might look a little like:

That’ll narrow it down. By the way, the  “America” in this case actually more like ‘the Americas’ and far more than just the United States – or even  more than North America. That information might come in handy for some of you.

Closure:

Whelp, there you have it… You have another article. This one will show you how to change the timezone, which might be something you need to know from time to time. It’s probably not something you need to remember, but now you can easily search for it.

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.

Make A Website Screenshot With CutyCapt

In today’s article, we’re going to use the terminal and make a website screenshot with CutyCapt. It’ll be a short and easily followed article, but one for everyone to follow. Even a rank beginner will easily be able to make a website screenshot with CutyCapt! (That’s the link to the project homepage, or where you need to go to learn more about CutyCapt.)

There are pretty much a zillion screenshot tools. There are even a metric-ton of browser extensions that specialize in taking a website screenshot. You can use any of those, or you can just install CutyCapt and use that from the terminal. There are even multiple choices when it comes to taking website screenshots from within the terminal, but  we’ll just be using this CutyCapt in this article.

If you’re curious, CutyCapt defines itself on SourceForge as:

CutyCapt is a small cross-platform command-line utility to capture WebKit’s rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP.

That appears to be a pretty solid definition. The CutyCapt tool does what it says on the tin and that’s it. You can’t really expect anything more – which is not a bad thing. You have one job and you need one tool. If the goal is to take a screenshot of a website via the terminal, the tool is CutyCat.

Make A Website Screenshot With CutyCapt:

Like oh so many, this article also requires 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 open, you’re going to need to install said CutyCapt. This may not be available for in all default repositories, but it’s in Debian/Ubuntu/Mint’s default repositories. So, using those as my example, you can install CutyCapt with:

Just know that your distro may not have this packaged, so follow the link in the preamble and find a way to install it in your distro of choice. You can compile it easily enough, should you need to go that far.

Once you have CutyCapt installed, it’s actually pretty easy. If you want use CutyCapt to take a screenshot of linux-tips.us, your command might look a little like this:

Or, in other words, it’s pretty basic:

It might look complicated, but CutyCapt is not all that complicated when you break it down. If the output size isn’t quite what you’re after (and it might not be), you can just keep playing with it until you get it exactly how you want it. The output format and expected screenshot size is all you need to worry about getting right.

Either way, as mentioned in the preamble, you can change the output. In our example, we specified .png. You need only change that and the output will change to what you specified. If you need any further assistance, you can use the classic man cutycapt to learn more about the application.

Closure:

See? You have yet another article. This one teaches you how to make a website screenshot with CutyCapt. It’s a pretty handy application to have on-hand if you’re into taking screenshots of websites. CutyCapt is only used for making screenshots and not a whole lot more than that, so it’s a one-trick-pony and intentionally so.

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: Hide The Output From wget

In today’s article you’re going to learn that you actually can hide the output from wget. I am not one of folks want to do this, but some do. Or at least the option is there, so I assume they do. Either way, read on and you’ll know how to hide the output from wget! 

Goodwood Revival is this weekend, but you’ll still get an article. I am thinking about going in person next year, so I’ll have to write articles ahead of time. I probably should have done that even though I’m just streaming it.

Anyhow, there’s an option that will let you hide the output from wget and it’s in my notes. I might as well turn it into an article because I’m sure someone wants to do this. 

What this does, to be clear, is shows no wget output in the terminal once you enter the command. You’re not running blind, however. I’ll show you how to at least ensure the command gets completed. So, it does have uses – when  you just don’t need to see the clutter.

Lots of people do loads of useful work in the terminal and don’t really need to see clutter, so this is one way to avoid that terminal clutter. I actually prefer to see what’s going on, but I’m weird like that. If you do not prefer to see what’s going on with wget, this article is for you!

Hide The Output From wget:

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.

It next requires that you use wget to get something. So, pick something and download it with wget. I don’t care what. You do you and download anything you want. To hide the output from wget, the command is:

That’s really it. However, you then have no idea if it it completed. Fortunately, you can make sure wget completes its task (within reason) with the -c flag. So then the command would look like:

See? Pretty simple. That command will not only hide the output from wget, it will ensure the download is completed. You’ll avoid cluttering up your terminal, or something…

Closure:

There you have it! You now know you can, and how you can, hide the output from wget. You can even be reasonably sure it completes behind the scenes. It’s not a very difficult article to follow today, so consider it an easy day. Now, back to my racing…

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.

Change Your Home Directory

In today’s article you’re going to learn that it’s possible to change your home directory. Why? Because Ol’ David is in a bit of a rush to get this out on time. I can’t miss my publication deadline! So far, there has been an article every other day. Gotta keep up the schedule.

Yesterday was an extremely frustrating day. People managed to waste my entire afternoon. The only consolation I got was that I drove home really quickly, in a very spirited manner. That was not enough consolation. So, I just drank a couple of delicious beers (Sierra Nevada Pale Ale) and went to sleep.

I expected to get up early and write the article. I did wake up early, but I fell back to sleep. My body wanted to catch up on some missed sleep and it did. Which means I’ve got like an hour to write this article.

(I don’t think there has ever been a more ‘bloggy’ post than this one! It’s horrible and I’ll hopefully never do it again.)

When I first planned this article, I planned on showing you how to change your home directory with a new user. It was going to be fairly long and needlessly complicated. So, instead, I’m just going to tell you how to do it. You can learn how to create a new user.

So then, let’s get onto the meat of this…

Change Your Home Directory:

There are all sorts of reasons why you might want to change your home directory. Maybe you don’t want people being able to easily spot it by traversing your directory tree? You might want to move it to a different partition that has more space? Who knows?

But, this isn’t something you want to do willy-nilly. See, a whole lot of things depend on your home directory and your home directory probably contains a lot of stuff. So, after you’ve changed your home directory you’re probably going to need to move a lot of stuff around. That’s why it’s best to do this with a new user. If you want to practice this, I’d say do it to a new user. There’s a link in the preamble to learn how to create a new user.

The command is remarkably simple. Just open up your terminal and run:

So, if I wanted to move my home to /foo/bar, the command would look like:

You don’t have to specify /home/kgiii – even though that’s the full directory path. The -d command knows that we’re generally talking about the home directory. If you’ve already moved your home directory, and it is outside of the /home directory, you’re probably gonna have to specify that. I don’t actually know, I’ve never tried that.

This isn’t something I’d undertake lightly. I’d really only recommend this on a new user OR if there are some very specific circumstances. You might do this if you’ve filled up your disk space, added a new disk, and want to move your home directory to the new disk so that you don’t have to muck about with changing partitions or anything. Even then, it’s a bad solution – but probably one of the best solutions you have available.

Closure:

Consider this an article that’s for a very special set of circumstances. It’s for when someone on a forum has run out of disk space and wants a way out without any changes to partitioning and doesn’t want to reinstall. This isn’t something you probably need to go playing around with, but you can. I ain’t stopping you. The potential to make a mess of this is pretty strong.

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.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.