How do I select 3,000 out of 10,000 files in file manager?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















I want to select the first 3,000 files in a folder which contains 10,000 files. How do I select only the first 3,000? And if possible, how can I subsequently select the next 3,000 and then 3,000 after that?



I need to copy them into separate folders, each with 3,000 files.










share|improve this question









New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Select as in highlight by mouse or some command ?

    – Emmet
    yesterday











  • @Emmet Either. I need to copy them into separate folders.

    – Sachihiro Astra
    yesterday






  • 2





    Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

    – chrylis
    yesterday


















5















I want to select the first 3,000 files in a folder which contains 10,000 files. How do I select only the first 3,000? And if possible, how can I subsequently select the next 3,000 and then 3,000 after that?



I need to copy them into separate folders, each with 3,000 files.










share|improve this question









New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Select as in highlight by mouse or some command ?

    – Emmet
    yesterday











  • @Emmet Either. I need to copy them into separate folders.

    – Sachihiro Astra
    yesterday






  • 2





    Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

    – chrylis
    yesterday














5












5








5








I want to select the first 3,000 files in a folder which contains 10,000 files. How do I select only the first 3,000? And if possible, how can I subsequently select the next 3,000 and then 3,000 after that?



I need to copy them into separate folders, each with 3,000 files.










share|improve this question









New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I want to select the first 3,000 files in a folder which contains 10,000 files. How do I select only the first 3,000? And if possible, how can I subsequently select the next 3,000 and then 3,000 after that?



I need to copy them into separate folders, each with 3,000 files.







files filemanager copy user-data






share|improve this question









New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 16 hours ago









Peter Mortensen

1,03421016




1,03421016






New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Sachihiro AstraSachihiro Astra

285




285




New contributor




Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Sachihiro Astra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Select as in highlight by mouse or some command ?

    – Emmet
    yesterday











  • @Emmet Either. I need to copy them into separate folders.

    – Sachihiro Astra
    yesterday






  • 2





    Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

    – chrylis
    yesterday



















  • Select as in highlight by mouse or some command ?

    – Emmet
    yesterday











  • @Emmet Either. I need to copy them into separate folders.

    – Sachihiro Astra
    yesterday






  • 2





    Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

    – chrylis
    yesterday

















Select as in highlight by mouse or some command ?

– Emmet
yesterday





Select as in highlight by mouse or some command ?

– Emmet
yesterday













@Emmet Either. I need to copy them into separate folders.

– Sachihiro Astra
yesterday





@Emmet Either. I need to copy them into separate folders.

– Sachihiro Astra
yesterday




2




2





Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

– chrylis
yesterday





Tasks like this are exactly why it's still useful to have and know a CLI even in the fancy-graphics age.

– chrylis
yesterday










1 Answer
1






active

oldest

votes


















8














There is no easy method to do that from a stock file manager. You can do it with Shift + Arrow Up (or Arrow Down) but you will need to select the amount of files yourself.



Command line:



This will copy (cp) 3000 files (-n 3000) to /opt/ (-t "$directory"):



cd /dir/with/files/
find . -maxdepth 1 -type f -print0 | head -z -n 3000 | xargs -0 -r -- cp -t "/opt/" --



  • Change 3000 to another number if needed

  • Change /opt/ to your desctination.

  • Use mv -tf to move instead of cp -t when you know cp does what you want (the mv is needed to clear the 3000 files)






share|improve this answer


























  • mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

    – Sachihiro Astra
    yesterday













  • Edit - It worked just by changing the flag from -f to -t for the mv command.

    – Sachihiro Astra
    yesterday











  • then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

    – Rinzwind
    yesterday













  • You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

    – steeldriver
    yesterday












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Sachihiro Astra is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1133779%2fhow-do-i-select-3-000-out-of-10-000-files-in-file-manager%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









8














There is no easy method to do that from a stock file manager. You can do it with Shift + Arrow Up (or Arrow Down) but you will need to select the amount of files yourself.



Command line:



This will copy (cp) 3000 files (-n 3000) to /opt/ (-t "$directory"):



cd /dir/with/files/
find . -maxdepth 1 -type f -print0 | head -z -n 3000 | xargs -0 -r -- cp -t "/opt/" --



  • Change 3000 to another number if needed

  • Change /opt/ to your desctination.

  • Use mv -tf to move instead of cp -t when you know cp does what you want (the mv is needed to clear the 3000 files)






share|improve this answer


























  • mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

    – Sachihiro Astra
    yesterday













  • Edit - It worked just by changing the flag from -f to -t for the mv command.

    – Sachihiro Astra
    yesterday











  • then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

    – Rinzwind
    yesterday













  • You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

    – steeldriver
    yesterday
















8














There is no easy method to do that from a stock file manager. You can do it with Shift + Arrow Up (or Arrow Down) but you will need to select the amount of files yourself.



Command line:



This will copy (cp) 3000 files (-n 3000) to /opt/ (-t "$directory"):



cd /dir/with/files/
find . -maxdepth 1 -type f -print0 | head -z -n 3000 | xargs -0 -r -- cp -t "/opt/" --



  • Change 3000 to another number if needed

  • Change /opt/ to your desctination.

  • Use mv -tf to move instead of cp -t when you know cp does what you want (the mv is needed to clear the 3000 files)






share|improve this answer


























  • mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

    – Sachihiro Astra
    yesterday













  • Edit - It worked just by changing the flag from -f to -t for the mv command.

    – Sachihiro Astra
    yesterday











  • then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

    – Rinzwind
    yesterday













  • You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

    – steeldriver
    yesterday














8












8








8







There is no easy method to do that from a stock file manager. You can do it with Shift + Arrow Up (or Arrow Down) but you will need to select the amount of files yourself.



Command line:



This will copy (cp) 3000 files (-n 3000) to /opt/ (-t "$directory"):



cd /dir/with/files/
find . -maxdepth 1 -type f -print0 | head -z -n 3000 | xargs -0 -r -- cp -t "/opt/" --



  • Change 3000 to another number if needed

  • Change /opt/ to your desctination.

  • Use mv -tf to move instead of cp -t when you know cp does what you want (the mv is needed to clear the 3000 files)






share|improve this answer















There is no easy method to do that from a stock file manager. You can do it with Shift + Arrow Up (or Arrow Down) but you will need to select the amount of files yourself.



Command line:



This will copy (cp) 3000 files (-n 3000) to /opt/ (-t "$directory"):



cd /dir/with/files/
find . -maxdepth 1 -type f -print0 | head -z -n 3000 | xargs -0 -r -- cp -t "/opt/" --



  • Change 3000 to another number if needed

  • Change /opt/ to your desctination.

  • Use mv -tf to move instead of cp -t when you know cp does what you want (the mv is needed to clear the 3000 files)







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









RinzwindRinzwind

210k28405540




210k28405540













  • mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

    – Sachihiro Astra
    yesterday













  • Edit - It worked just by changing the flag from -f to -t for the mv command.

    – Sachihiro Astra
    yesterday











  • then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

    – Rinzwind
    yesterday













  • You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

    – steeldriver
    yesterday



















  • mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

    – Sachihiro Astra
    yesterday













  • Edit - It worked just by changing the flag from -f to -t for the mv command.

    – Sachihiro Astra
    yesterday











  • then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

    – Rinzwind
    yesterday













  • You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

    – steeldriver
    yesterday

















mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

– Sachihiro Astra
yesterday







mv: target './10000000.jpg' is not a directory This error shows up when I use the mv command. However it works just fine when I use the cp command. Also, is there a way to delete the first 3,000 files in the same way?

– Sachihiro Astra
yesterday















Edit - It worked just by changing the flag from -f to -t for the mv command.

– Sachihiro Astra
yesterday





Edit - It worked just by changing the flag from -f to -t for the mv command.

– Sachihiro Astra
yesterday













then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

– Rinzwind
yesterday







then tf. f to force overwrite ;) And the cp is just to test the 1st group. mv delete the 3000 files.

– Rinzwind
yesterday















You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

– steeldriver
yesterday





You can probably omit the -- end-of-options argument, since find . will prepend ./ to every filename. You could also consider using printf './%s' * in place of the find -maxdepth 1 command

– steeldriver
yesterday










Sachihiro Astra is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Sachihiro Astra is a new contributor. Be nice, and check out our Code of Conduct.













Sachihiro Astra is a new contributor. Be nice, and check out our Code of Conduct.












Sachihiro Astra is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1133779%2fhow-do-i-select-3-000-out-of-10-000-files-in-file-manager%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Category:香港粉麵

List *all* the tuples!

Channel [V]