LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-03-2010, 03:38 PM   #1
rastin_nz
LQ Newbie
 
Registered: Oct 2010
Posts: 17

Rep: Reputation: 0
need to copy all " *.SEED " files and paste them inside a new folder each time


Hi there,
I have a "while" loop ;
1. I need to create a folder at each run ( folder with different names)
Code:
mkdir $i // i can be a counter to have different name each time ?!!! not sure
2.I should then move all the files of type ".SEED" to the created folder. (copy > paste & delete from the current directory)
Code:
rm *.SEED  //need help I do not know how to transfer the files
your help is appreciate
 
Old 11-03-2010, 05:02 PM   #2
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 871
Blog Entries: 9

Rep: Reputation: 103Reputation: 103
hi, to create a directory with a unique name at each run, "mkdir $i.$$" will append the PID to $i, and if $i is a counter, you'll get 1.PID, 2.PID ...
As for copy-> paste -> delete from source, you've just described the mv command.

Not sure I understood completely what you wanted though...

Serafean
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
C++ - "snprintf" inside "for" doesn't work as expected. (int to char*) Repgahroll Programming 14 08-31-2010 08:27 AM
How to create a "fixed-space"-a folder that is EXT2 inside and whatever size-50MB? linus72 Linux - Newbie 3 04-08-2009 08:47 AM
Disable xorg's "highlight to copy, middle click to paste" clipboard tromboneman Linux - Newbie 1 06-08-2008 11:53 AM
How do i "copy" one bios and "paste" it onto another identical machine Yerp Linux - Hardware 2 01-10-2007 08:31 PM
Cannot "Copy To" .jpg file to wallpaper folder LeanPudLou Suse/Novell 5 11-08-2004 08:24 AM


All times are GMT -5. The time now is 09:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration