How do I select 3,000 out of 10,000 files in file manager?How can I change a set of files Permsissions from Root to usercopying files from multiple directory to another multiple directoryHow can I copy files with common names and paste them into another folder?How to select a file from a network share with file manager file open dialogCopying selected files in multiple folders to different destination in UbuntuHow to copy only files (.wrk) from multiple directories and subfoldersHow to copy random files to a specific folder?How to copy a subset of subfolders recursively

Why is it that I have to play this note on the piano as A sharp?

Methods and Feasibility of Antimatter Mining?

Do aarakocra have arms as well as wings?

How do we create our own symbolisms?

How should Thaumaturgy's "three times as loud as normal" be interpreted?

Quick Shikaku Puzzle: Stars and Stripes

Why is the the worst case for this function O(n*n)

Is it unavoidable taking shortcuts in software development sometimes?

Why does low tire pressure decrease fuel economy?

Why would an AC motor heavily shake when driven with certain frequencies?

How to set any file manager in Linux to show the duration like the Length feature in Windows Explorer?

The meaning of "offing" in "an agreement in the offing"

Is there a "right" way to interpret a novel, if not, how do we make sure our novel is interpreted correctly?

Contractor cut joist hangers to make them fit

How strong is aircraft-grade spruce?

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

Is every sentence we write or utter either true or false?

What happens when a file that is 100% paged in to the page cache gets modified by another process

How is lower/no gravity simulated on a planet with gravity, without leaving the surface?

Why would an airport be depicted with symbology for runways longer than 8,069 feet even though it is reported on the sectional as 7,200 feet?

Can multiple public keys lead to the same shared secret in x25519?

Is there a specific way to describe over-grown, old, tough vegetables?

Bit floating sequence

Do you need to burn fuel between gravity assists?



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


How can I change a set of files Permsissions from Root to usercopying files from multiple directory to another multiple directoryHow can I copy files with common names and paste them into another folder?How to select a file from a network share with file manager file open dialogCopying selected files in multiple folders to different destination in UbuntuHow to copy only files (.wrk) from multiple directories and subfoldersHow to copy random files to a specific folder?How to copy a subset of subfolders recursively






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








7















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


























  • Select as in highlight by mouse or some command ?

    – Jim
    Apr 14 at 10:47











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

    – Sachihiro Astra
    Apr 14 at 10:51






  • 2





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

    – chrylis
    Apr 14 at 22:01

















7















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


























  • Select as in highlight by mouse or some command ?

    – Jim
    Apr 14 at 10:47











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

    – Sachihiro Astra
    Apr 14 at 10:51






  • 2





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

    – chrylis
    Apr 14 at 22:01













7












7








7








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
















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















share|improve this question













share|improve this question




share|improve this question








edited Apr 15 at 8:44









Peter Mortensen

1,0262 gold badges11 silver badges17 bronze badges




1,0262 gold badges11 silver badges17 bronze badges










asked Apr 14 at 10:35









Sachihiro AstraSachihiro Astra

386 bronze badges




386 bronze badges















  • Select as in highlight by mouse or some command ?

    – Jim
    Apr 14 at 10:47











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

    – Sachihiro Astra
    Apr 14 at 10:51






  • 2





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

    – chrylis
    Apr 14 at 22:01

















  • Select as in highlight by mouse or some command ?

    – Jim
    Apr 14 at 10:47











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

    – Sachihiro Astra
    Apr 14 at 10:51






  • 2





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

    – chrylis
    Apr 14 at 22:01
















Select as in highlight by mouse or some command ?

– Jim
Apr 14 at 10:47





Select as in highlight by mouse or some command ?

– Jim
Apr 14 at 10:47













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

– Sachihiro Astra
Apr 14 at 10:51





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

– Sachihiro Astra
Apr 14 at 10:51




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
Apr 14 at 22:01





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

– chrylis
Apr 14 at 22:01










1 Answer
1






active

oldest

votes


















10
















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
    Apr 14 at 11:04












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

    – Sachihiro Astra
    Apr 14 at 11:13











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

    – Rinzwind
    Apr 14 at 11:21












  • 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
    Apr 14 at 12:12













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/4.0/"u003ecc by-sa 4.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
);



);














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









10
















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
    Apr 14 at 11:04












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

    – Sachihiro Astra
    Apr 14 at 11:13











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

    – Rinzwind
    Apr 14 at 11:21












  • 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
    Apr 14 at 12:12















10
















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
    Apr 14 at 11:04












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

    – Sachihiro Astra
    Apr 14 at 11:13











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

    – Rinzwind
    Apr 14 at 11:21












  • 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
    Apr 14 at 12:12













10














10










10









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 Apr 14 at 11:21

























answered Apr 14 at 10:54









RinzwindRinzwind

222k29 gold badges428 silver badges570 bronze badges




222k29 gold badges428 silver badges570 bronze badges















  • 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
    Apr 14 at 11:04












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

    – Sachihiro Astra
    Apr 14 at 11:13











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

    – Rinzwind
    Apr 14 at 11:21












  • 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
    Apr 14 at 12:12

















  • 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
    Apr 14 at 11:04












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

    – Sachihiro Astra
    Apr 14 at 11:13











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

    – Rinzwind
    Apr 14 at 11:21












  • 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
    Apr 14 at 12:12
















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
Apr 14 at 11:04






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
Apr 14 at 11:04














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

– Sachihiro Astra
Apr 14 at 11:13





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

– Sachihiro Astra
Apr 14 at 11:13













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

– Rinzwind
Apr 14 at 11:21






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

– Rinzwind
Apr 14 at 11:21














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
Apr 14 at 12:12





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
Apr 14 at 12:12


















draft saved

draft discarded















































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

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?