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;
}
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
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.
add a comment |
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
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
add a comment |
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
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
files filemanager copy user-data
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.
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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 -tfto move instead ofcp -twhen you knowcpdoes what you want (themvis needed to clear the 3000 files)
mv: target './10000000.jpg' is not a directoryThis error shows up when I use themvcommand. However it works just fine when I use thecpcommand. 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-fto-tfor themvcommand.
– Sachihiro Astra
yesterday
thentf. 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, sincefind .will prepend./to every filename. You could also consider usingprintf './%s' *in place of thefind -maxdepth 1command
– steeldriver
yesterday
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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 -tfto move instead ofcp -twhen you knowcpdoes what you want (themvis needed to clear the 3000 files)
mv: target './10000000.jpg' is not a directoryThis error shows up when I use themvcommand. However it works just fine when I use thecpcommand. 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-fto-tfor themvcommand.
– Sachihiro Astra
yesterday
thentf. 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, sincefind .will prepend./to every filename. You could also consider usingprintf './%s' *in place of thefind -maxdepth 1command
– steeldriver
yesterday
add a comment |
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 -tfto move instead ofcp -twhen you knowcpdoes what you want (themvis needed to clear the 3000 files)
mv: target './10000000.jpg' is not a directoryThis error shows up when I use themvcommand. However it works just fine when I use thecpcommand. 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-fto-tfor themvcommand.
– Sachihiro Astra
yesterday
thentf. 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, sincefind .will prepend./to every filename. You could also consider usingprintf './%s' *in place of thefind -maxdepth 1command
– steeldriver
yesterday
add a comment |
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 -tfto move instead ofcp -twhen you knowcpdoes what you want (themvis needed to clear the 3000 files)
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 -tfto move instead ofcp -twhen you knowcpdoes what you want (themvis needed to clear the 3000 files)
edited yesterday
answered yesterday
RinzwindRinzwind
210k28405540
210k28405540
mv: target './10000000.jpg' is not a directoryThis error shows up when I use themvcommand. However it works just fine when I use thecpcommand. 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-fto-tfor themvcommand.
– Sachihiro Astra
yesterday
thentf. 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, sincefind .will prepend./to every filename. You could also consider usingprintf './%s' *in place of thefind -maxdepth 1command
– steeldriver
yesterday
add a comment |
mv: target './10000000.jpg' is not a directoryThis error shows up when I use themvcommand. However it works just fine when I use thecpcommand. 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-fto-tfor themvcommand.
– Sachihiro Astra
yesterday
thentf. 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, sincefind .will prepend./to every filename. You could also consider usingprintf './%s' *in place of thefind -maxdepth 1command
– 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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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