Quote:
Originally Posted by BW-userx
have you ever thought about learning BASH scripting?
|
I would really like to do this, and have started a number of times but I've yet to find a good method for learning. Some examples (when reading online "how to's" for specific operations, I'll copy the script exactly as the poster says they are using and it won't run in my machine. While I know that isn't writing my own code, it was a way to start seeing how things worked.
Can you suggest any books, sites, or methods on how to start on this? I would like to eventually learn python (from what I have read from its benefits and "power" it seems very versitile and a good investment in my time).
As far as my origninal question on how the files copy, can what I asked be done with BASH scripting? I'm thinking of a program called Teracopy in Windows that I like for a number of reasons.
Here is an example of a program I would like to write but don't know how to start. Let's say I take 500 different files from MANY different directories across different drives (let's say 200+GB of data) and with destinations varying across different drives and folders. The program would assign each file a variable related to the physical drive it is on (sda, sdb, sdc, etc) but disregard the partitions as there could be many partitions on one drive. This would be the source variable. Then for each destination location for each file, it could cross reference the drive as well and assign another variable as the destination variable. If 100GB from dev/sda needs to be copied to dev/sdc then that is no problem, if 25GB of /dev/sdb copied to /dev/sdf, then that could be done at the same time as the 100GB transfer as the read/write of the hard drives shouldn't interfere with each other. Now if 75GB from /dev/sdh needs to be copied to /dev/sda then that would interfere with the first 100GB transfer of source files from /dev/sda so that would be put inthe que to be run after the initial 100GB transfer is completed.
Now I know much of this will depend on the type of computer that is being used (processor(s) type/speed as well as what type of hard drives are being used.
I would also like to incorporate SSD cache drives (or partitions for this) or possibly RAM drives when sufficient RAM is available. These could be used in the last example of the 75GB transfer that was to be copied to the busy /dev/sda. The data is copied from source to the cache, and when sda is ready, the data can be copied from the cache drive at top speed while freeing up the source drive of the 75GB for any other activities that needed to be done (copying, loading files:video, audio, Virtual machines, etc) without having to wait for the copying to finish.
What kind of programming would I have to know to do a project such as this.
On top of this, the program would run performance tests on drives when they are installed so it knows how it should perform and how best to handle copy/move requests as well as a few other operations I have in mind to make things a little more slick.