LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2020, 07:30 AM   #1
nikolaymartin
LQ Newbie
 
Registered: May 2019
Posts: 9

Rep: Reputation: Disabled
Copy bulk Files in Linux


I have multiple files in a Linux systems where I want to copy them with a single cp command into a different path and directory. Should I write a bash script to copy one by one?
 
Old 05-04-2020, 07:43 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
that will hardly work with a single cp, but without details hard to say anything. I suggest you to read the man page of cp.
You can write a bash/perl/python/tcsh/whatever script to do that, which is your preferred language?
 
Old 05-04-2020, 07:47 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,357
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
Yes, more details are needed. What critera do you have for selecting the files and where, rather specifically, shall they be put?
 
1 members found this post helpful.
Old 05-04-2020, 08:12 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Can you specify these files using a find command? If so you can use find with an -exec argument or pipe the find results to another command.
 
Old 05-04-2020, 12:18 PM   #5
WideOpenSkies
Member
 
Registered: May 2019
Location: /home/
Distribution: Arch Linux
Posts: 166

Rep: Reputation: 61
Should you write a bash script? Absolutely. Some details, as others have said, would be great.
 
Old 05-04-2020, 12:50 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
It's the sixth thread started by the OP here on LQ. But there were never follow-ups.
 
1 members found this post helpful.
Old 05-05-2020, 05:41 AM   #7
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by shruggy View Post
It's the sixth thread started by the OP here on LQ. But there were never follow-ups.
I just looked and your'e right, I always try to acknowledge any help I get - just polite!
 
Old 05-06-2020, 03:51 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ I guess some people do "bulk posting" - same question on a dozen different forums, then check the "harvest" a few days later.
Positively harmful behaviour if you ask me.
Maybe they even forget the other forums as soon as they get their handout, who knows. Interwebz is full of [expletive deleted].
 
Old 05-06-2020, 08:05 AM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
It's the sixth thread started by the OP here on LQ. But there were never follow-ups.
Seems I was wrong all the way here.

@samueltarcin9999. That's funny. You always answer the questions of the OP as well as of Gabriel99990, but only them. Are they your alter ego? Is it a game of sorts I don't get?
 
Old 05-06-2020, 06:52 PM   #10
WideOpenSkies
Member
 
Registered: May 2019
Location: /home/
Distribution: Arch Linux
Posts: 166

Rep: Reputation: 61
Quote:
Originally Posted by ondoho View Post
^ I guess some people do "bulk posting" - same question on a dozen different forums, then check the "harvest" a few days later.
Positively harmful behaviour if you ask me.
Maybe they even forget the other forums as soon as they get their handout, who knows. Interwebz is full of [expletive deleted].
kek
 
Old 05-07-2020, 05:45 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by shruggy View Post
Seems I was wrong all the way here.

@samueltarcin9999. That's funny. You always answer the questions of the OP as well as of Gabriel99990, but only them. Are they your alter ego? Is it a game of sorts I don't get?
Interesting.
All their posts provide links to the same web site; and incidentally I found out that user ibaydan is doing the same, so it would appear that samueltarcin9999 is ibaydan's alter ego, and at that point it seems entirely possible that this user has create a whole bunch of sockpuppets to promote their malware-ridden blog.

I am now reporting all samueltarcin9999's posts.
 
3 members found this post helpful.
  


Reply

Tags
copy, linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Bulk Rename Files in Linux with Thunar’s Bulk Rename Tool LXer Syndicated Linux News 0 11-27-2019 07:03 PM
Linux Bulk renaming files jazziao Linux - Newbie 4 02-10-2015 01:08 PM
[SOLVED] How can I bulk copy files to a new extension in the same directory? jbruyet Linux - Software 6 09-15-2014 01:54 PM
Want to change how pasted files are named "(copy)," "(another copy)," "(3rd copy)" L a r r y Linux - Desktop 3 08-24-2013 03:39 PM
Is there any alternative for cp aommand in linux to copy bulk data ????? madhuri_aage Linux - Software 2 02-13-2006 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration