Results 1 to 6 of 6
OK, I am a complete Linux noob, with very little programming experience. So I am trying to find out if what I am trying to accomplish is feasible before delving ...
- 07-23-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
Noob question about USB to USB transfer program
OK, I am a complete Linux noob, with very little programming experience. So I am trying to find out if what I am trying to accomplish is feasible before delving into the intricacies of Linux programming. I am simply looking for feedback from experienced linux users and programmers. Any help or input would be greatly appreciated....
This is what I need to accomplish:
Boot into Linux, mount 2 usb flash drives, transfer files from one usb drive to the other, and signal the tranfer is complete by playing an audio file. All of this needs to be done without a display and, without any user input. The only user input will be to turn on the machine, and after the transfer is complete, turn off the machine. The proposed hardware for this project is a BeagleBoard OMAP3530 ARM single-board computer.
My questions are: is this a feasible linux project? What skill level would be required to write a program such as this?
Thanks so much!
- 07-23-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
quite feasible--first you do it manually, then put the commands
into an executable file. Something like this--
> 1. boot into Linux
automatic (I suppose) when machine turned on
> 2. mount 2 usb flash drives
mkdir /mntA /mntB; mount /dev/sda1 /mntA; mount /dev/sdb1 /mntB
> 3. transfer files from one usb drive to the other
cd mntA; cp `cat l` /mntB
where "l' is the list of files to transfer
> 4. signal tranfer complete by playing an audio file
<music playing program> <music>.ogg
5. auto turnoff
shutdown -h nowthe sun is new every day (heraclitus)
- 07-23-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
Wow, thank you for the great (and detailed) reply! I guess I can move into the next step of the project.
My only Linux experience is with Ubuntu, but I have been told that Ubuntu has compatibility issues with the hardware I am using. How much variance exists (if any) between Linux versions, as far as commands go?
- 07-24-2009 #4
The above are all standard commands, they should work on any version of Linux.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 07-24-2009 #5Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
Awesome, thank you.
OK, next questions:
Once I put the commands into an executable, how do I get that to load automatically after the system boots?
Also, I have been experimenting with these commands on ubuntu, but I get the message:
"mount : only root can do that"
I am using "sudo" before the commands, which I thought was how to enter commands as root on ubuntu
Is there a way to make my user account the default or root account, and how do I set permissions for accounts?
- 07-24-2009 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You can add on-boot commands to /etc/rc.d/rc.local which is a script that is executed after all the other startup scripts have run. You might want to put a few second wait in there since it can take a bit for the system to recognize the USB devices.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
