How To Transfer A number of File Sorts Concurrently From Commandline


Get real time updates directly on you device, subscribe now.

Move Multiple File Types

The opposite day I used to be questioning how can I transfer (not copy) a number of file sorts from listing to a different. I already knew the way to discover and replica sure sort of recordsdata from one listing to a different. However, I don’t know the way to transfer a number of file sorts concurrently. For those who’re ever in a state of affairs like this, I do know a simple strategy to do it from commandline in Unix-like techniques.

Transfer A number of File Sorts Concurrently

Image this state of affairs.You’ve a number of sort of recordsdata, for instance .pdf, .doc, .mp3, .mp4, .txt and so forth., on a listing named ‘dir1’. Allow us to check out the dir1 contents:

$ ls dir1
file.txt picture.jpg mydoc.doc private.pdf music.mp3 video.mp4

You need to transfer among the file sorts (not all of them) to completely different location. For  instance, allow us to say you need to transfer doc, pdf and txt recordsdata solely to a different listing named ‘dir2’ in a single go.

To repeat .doc, .pdf and .txt recordsdata from dir1 to dir2 concurrently, the command can be:

$ mv dir1/*. dir2/

It’s simple, isn’t it?

Now, allow us to test the contents of dir2:

$ ls dir2/
file.txt mydoc.doc private.pdf

See? Solely the file sorts .doc, .pdf and .txt from dir1 have been moved to dir2.

mv command

You may add as many file sorts as you need to inside curly braces within the above command to maneuver them throughout completely different directories. The above command simply works effective for me on Bash.

One other strategy to transfer a number of file sorts is go to the supply listing i.e dir1 in our case:

$ cd ~/dir1

And, transfer file sorts of your option to the vacation spot (E.g dir2) as proven beneath.

$ mv *.doc *.txt *.pdf /dwelling/sk/dir2/

To maneuver all recordsdata having a specific extension, for instance .doc solely, run:

$ mv dir1/*.doc dir2/

For extra particulars, refer man pages.

$ man mv

Transferring a couple of variety of identical or completely different file sorts is straightforward! You may do that with couple mouse clicks in GUI mode or use a one-liner command in CLI mode. Nonetheless, When you have hundreds of various file sorts in a listing and needed to maneuver a number of file sorts to completely different listing in a single go, it could be a cumbersome process. To me, the above methodology did the job simply! If you already know another one-liner instructions to maneuver a number of file sorts at a time, please share it within the remark part beneath. I’ll test and replace the information accordingly.

And, that’s all for now. Hope this was helpful. Extra good stuffs to return. Keep tuned!


Thanks for stopping by!

Assist us that will help you:

Have a Good day!!

enableHover: false,
enableTracking: true,
buttons: twitter: ,
click on: perform(api, choices)
share: ,
template: ‘


enableHover: false,
enableTracking: true,
buttons:format: ‘box_count’,
click on: perform(api, choices)
share: ,
template: ‘


enableHover: false,
enableTracking: true,
urlCurl: ‘’,
click on: perform(api, choices)

// Scrollable sharrre bar, contributed by Erik Frye. Superior!
var $_shareContainer = $(“.sharrre-container”),
$_header = $(‘#header’),
$_postEntry = $(‘.entry’),
$window = $(window),
startSharePosition = $_shareContainer.offset(),//object
contentBottom = $_postEntry.offset().prime + $_postEntry.outerHeight(),
topOfTemplate = $_header.offset().prime,
topSpacing = _setTopSpacing();

//triggered on scroll
shareScroll = perform()

//setup occasion listeners
$window.scroll( _.throttle( perform() , 50 ) );
$window.resize( _.debounce( perform()
if ( $window.width() > 719 )

, 50 ) );


Source link

Leave A Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More