Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u596154002/domains/usbusinessreviews.com/public_html/wp-includes/functions.php on line 6114
How to copy and rename files from the Linux terminal window - Best Business Review Site 2024

How to copy and rename files from the Linux terminal window

[ad_1]

Person using a laptop

PixelsEffect/Getty Images

When you first start using Linux, you’ll most likely be glued to the GUI. That’s not only totally understandable but acceptable. There is no shame in not using the command line. In fact, you could go your entire Linux life without ever touching the terminal window.

But for some tasks, the terminal is simply more efficient. The only difference to using the GUI is that you have to remember the commands to use. 

Also: How to replace Windows with Linux Mint on your PC

I want to help you with this process. In fact, my goal all along is to make Linux easy to understand for the masses. As part of that effort, I like to include the command line interface (CLI) because there’s so much you can do with it. 

With that in mind, let’s start with two very simple but handy commands for copying and renaming files.

Ready to type?

How to copy a file

What you’ll need: The only thing you’ll need for this process is a running instance of Linux. It won’t matter what distribution you use, as the two commands I’m going to show you are included with every version of Linux you’ll encounter.

The first thing to do is open a terminal window. To do this, open your desktop menu and either search for “terminal” or navigate through the default menu until you find the terminal listed. The name of this app will will depend on the desktop you’re using. 

Also: The best Linux distros for beginners

Fortunately, most desktops use fuzzy searching, so if you type terminal in the menu search field, it should appear (whether it’s Konsol, Terminal, Tilex, or any number of options). The good news is most Linux terminals work the same way.

Let’s say you have a file named zdnet_test.txt in your home directory and you want to copy it to your Documents directory. The command for that process would be:

cp ~/zdnet_test ~/Documents/

One thing to note is that ~/ is a shortcut for /home/USER (where USER is your username), so you don’t have to type as much. 

Also: How to choose the right Linux desktop distribution

If you were already in your home directory (which your terminal app should default to when you first open it), you could short the command to:

How to rename a file

Let’s now rename a file.

1. Renaming while copying

You can rename a file, while copying it. Let’s say you want to copy zdnet_test to Documents, but also rename it to zdnet.test. For that, the command would be:

cp zdnet_test Documents/zdnet.test

Remember, the above command would only work if you were already in your home directory, otherwise you’d need to add ~/ on both ends, like so:

cp ~/zdnet_test ~/Documents/zdnet.test

2. Renaming while moving

You can also rename a file when moving it. This process is almost the same as above, but you’re not copying a file to another directory, you’re moving it. 

Also: How to enable Linux on your Chromebook

This task is accomplished with the mv command. We’ll stick with our example. Say, you have zdnet_test in your home directory, and you want to move it to Documents and rename it to zdnet.test at the same time. The command for this process is:

mv zdnet_test Documents/zdnet.test

Remember, if you’re not already in your home directory, that command would be:

mv ~/zdnet_tst ~/Documents/zdnet.test

And that’s all there is to renaming a file in Linux. This is a very basic task that you can use to get accustomed to the Linux CLI…but only if you feel the need to start broadening your understanding of the open-source operating system. Otherwise, stick to the GUI.



[ad_2]

Source link

slot gacor slot gacor togel macau slot hoki bandar togel slot dana slot mahjong link slot link slot777 slot gampang maxwin slot hoki slot mahjong slot maxwin slot mpo slot777 slot toto slot toto situs toto toto slot situs toto situs toto situs toto situs toto slot88 toto slot slot gacor thailand slot bet receh situs toto situs toto slot toto slot situs toto situs toto situs toto situs togel macau toto slot slot demo slot pulsa slot pragmatic situs toto deposit dana 10k surga slot toto slot link situs toto situs toto slot situs toto situs toto slot777 slot gacor situs toto slot slot pulsa 10k toto togel situs toto slot situs toto slot gacor terpercaya slot dana slot gacor pay4d agen sbobet kedai168 kedai168 deposit pulsa situs toto slot pulsa situs toto slot pulsa situs toto situs toto situs toto slot dana toto slot situs toto slot pulsa toto slot situs toto slot pulsa situs toto situs toto situs toto toto slot toto slot slot toto akun pro maxwin situs toto slot gacor maxwin slot gacor maxwin situs toto slot slot depo 10k toto slot toto slot situs toto situs toto toto slot toto slot toto slot toto togel slot toto togel situs toto situs toto toto slot slot gacor slot gacor slot gacor situs toto situs toto cytotec toto slot situs toto situs toto toto slot situs toto situs toto slot gacor maxwin slot gacor maxwin link slot 10k slot gacor maxwin slot gacor slot pulsa situs slot 10k slot 10k toto slot toto slot situs toto situs toto situs toto bandar togel 4d toto slot toto slot situs toto toto slot toto togel