Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 11-03-2010, 03:38 PM   #1
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)
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)
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
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 881
Blog Entries: 11

Rep: Reputation: 104Reputation: 104
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...

1 members found this post helpful.


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 / openSUSE 5 11-08-2004 08:24 AM

All times are GMT -5. The time now is 02:29 AM.

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