Learn how to use the mv command: 2-Minute Linux Ideas

Hello, that is Sandra Henry-Stocker, writer of the “Unix as a Second Language” weblog on NetworkWorld.
On this Linux tip, we’re going to take a look at the mv (transfer) command that lets you rename information, transfer information to different locations within the file system or do each of these issues on the similar time.
In its easiest type, we might use a command like this to rename a file:
Nothing will change in regards to the file aside from its title.
To maneuver a file to a different location (assuming you’re presently within the listing wherein the file is situated, you’ll do one thing like this.
This might transfer to the file to /tmp and rename it myfile.
File permissions and file possession gained’t be modified – simply the place the file is situated.
You possibly can transfer information into your private home listing as simply as you’ll be able to transfer information out of it. Right here’s an instance:
This command would transfer the required file into your private home listing (~ = the consumer’s dwelling listing).
It’s also possible to transfer many information directly in the event you use wild playing cards. For instance:
In that command, we moved all zipped information within the present listing into our backups folder.
That’s your Linux tip for the mv command.
If in case you have questions or wish to recommend a subject, please add a remark under. And don’t neglect to subscribe to the IDG Tech(speak) channel on YouTube.
Should you favored this video, please hit the like and share buttons. For extra Linux ideas, be sure you observe us on Fb, YouTube and NetworkWorld.com.


Germany Devoted Server

Leave a Reply