Programming :: Bash Script To Copy All Music To New Hard Drive From Multiple Network Shares
Aug 9, 2010
I need a script to copy music from a network drive to my local disk. I require the script to auto mount the remote server, then to create the directory path to the mp3's I have a list of all teh songs in the following format, note some have spaces.
\7800SPARE4UsersPublicMusicSample MusicKalimba.mp3 \7800SPARE4UsersPublicMusicSample MusicMaid with the Flaxen Hair.mp \7800SPARE5UsersPublicMusicSample Song Sleep Away.mp3
I can use the following to mount the directory:
mount -t cifs //7800SPARE4/Users /dest-o username=user,password=pass
I'm thinking the best way would be to get the share name 7800SPARE and the grep for all these in the list, then mount it and do a while read LINE However I would need to creat the folders, I am unsure on how to do this. I think I would need to sed the backslashes to forward ones and then use rsync? Then unmount and move on to the next ones, if I can't mount the share It would be nice to log it and skip it.
View 2 Replies
ADVERTISEMENT
May 4, 2010
Seeking a decent Perl or Bash script or hack used to copy data from a CD/DVD to local or even remote hard drive/storage.
View 7 Replies
View Related
Jul 25, 2011
I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.
Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?
View 5 Replies
View Related
Nov 29, 2010
First and foremost, I really appreciate this newer release of Ubuntu 10.10. My boss wanted to use SLAX, but I had great experience with 8.10 and I have installed 10.10 on laptops and netbooks. on with the challenge for the day: I have configured a user's profile on 10.10 to startup Firefox in kiosk to go to our secure portal. The problem is I don't particularly care to REDO configure a user's profile session over and over.
So, if any of you whiz kids out there can come up with a better way to copy a user's profile...particularly the files that are used for Mozilla Firefox so that I can just copy and paste the files onto another hard drive with a fresh 10.10 that would be great.
The ONLY issue I have working with Linux is that I can not rapidly deploy my settings I have set for 'user' as I can with Windows. I am sure if there was a way to do this, deployment of Ubuntu 10.10 would go MUCH faster. As it stands, if I am able to pull this off...there will be a potential of removing Windows desktops. Which is fine for me because I can manage desktops a little easier on this platform than Windows.
This is what I have installed in Ubuntu:
IcedTea (for Java plugin for Firefox)
Profile Editor
R-Kiosk
All those work great with Firefox, but getting those installed on a new system is a bit daunting.especially when some users suggest doing cloning when in reality...I plan to do the install via LiveCD and THEN hopefully create the user on the fly in Terminal and copy the user files needed off a flash drive into the home/user folder
View 1 Replies
View Related
Jan 11, 2011
I have a hard drive which I put in an enclosure so that I can attach it by USB to my laptop, like a giant flash drive. In other words, its an external Hard Drive now. When I first plug it in it is detected and mounts like you would expect, but after a few minutes it unmounts. It's like the drive spins down and unmounts or something.
So, I want to remount it over my network rather than having to walk over to the computer and unplug the Hard Drive and then plug it back in. I would even be happy if I could just remote desktop onto that machine and remount the device somehow.
Here's the problem:
When the Hard Drive is mounted, and I run the "mount" command in terminal it shows up as:
/dev/sdc1 on /media/"NAME OF HARD DRIVE"
but when it unmounts itself and I run lsusb in terminal it only shows up as:
Bus 002 Device 053: ID 13fd:1840 Initio Corporation
I don't know how to get it to mount based on that name. So, I am asking: given that it shows up with that name, how can I remount the device from the command line...
The ultimate goal being to get it to reappear in my SAMBA shares.
View 2 Replies
View Related
Aug 31, 2010
Am I able to move Music folder to a different hard drive without moving my whole /home or do I just make a folder there and call it Music and change all the programs that use the music's default music folder?
View 3 Replies
View Related
Apr 11, 2011
I have 5 FTP users that upload files (and subdirectories) in their home directory, i need to mirror theese directories beetween them and with a "master" directory (accessible from a 6th user). Files can contain spaces or others special caracters. All the files are in the same filesystem, and i want to use hard link because i don't want to waste 5 time the space of a single file. I tried with find but i cannot handle spaces in it.
View 1 Replies
View Related
Apr 4, 2011
So my 10.10 computer died on me a few weeks ago, and I've just got a new 10.04 machine up and running. I'm trying to pull some files off of the 10.10's hard drive via external connection, but I've got no idea where to look. In addition to that, I'm being told that I don't have the permissions to access several areas of the drive (like the root folder).
Where should I look, and how do I get the permissions to look there?
View 3 Replies
View Related
May 13, 2010
I have this code:
Code:
original_content=${content[@]};
echo ${#content[@]} # is 23
echo ${#original_content[@]} # is 1
I'd expect original_content should be copy of content. How to copy array?
View 2 Replies
View Related
Mar 5, 2010
I am trying to use k9copy to simply copy the iso of a DVD movie to my hard drive. No matter what I select I can't get "copy" to enable - it stays grayed out. When I try to run the wizard it crashes after I select in my input source. I don't care what app I use, I just want something lightweight and easy to use that will copy the iso.
View 7 Replies
View Related
Dec 8, 2010
i have ubuntu 10.04 on a partition of a drive,
i have bought a new harddrive and want to copy the content of the "ubuntu partition" to a new partition on the new drive.
can i just copy all the data and then run a live disc to make a new boot loader ?
View 9 Replies
View Related
Jan 9, 2011
I want to copy my ubuntu install to a bigger hard drive, and am not quite sure what to do. According to my google searches, I need to run ubuntu from a live cd, then in a partitioning program copy the ubuntu partition to the new one, then resize it. Is that all? Do I need a linuxswap partition on the new hard drive? I have been using kde partition manager to arrange my new partitions. On one hard drive I have the partition I want to install ubuntu on(what type should this be? ext4?) and a partition to share between ubuntu and windows, and then will use my old ubuntu partition for installing windows xp.
View 2 Replies
View Related
Jul 3, 2010
In my laptop I have a 200GB hard drive that is starting to make clicking and grinding noises and won't boot about every third try.
Code:
root@Frank2:/home/bruce# fdisk -l
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[Code]...
/dev/sdb is a usb flash drive that has pmagic (not sure of the version, but it's 2.6.32.9-pmagic kernel, so I think it's the latest version). I'm posting from pmagic right now because I don't want the failing disk to get any worse until I get this sorted. I also know there is a post here called something like 'learning the dd command' or 'mastering the dd command' or something to that effect, but I can't find it for the life of me (I have it bookmarked on the failing drive, of course). If someone could point me to that post,
View 8 Replies
View Related
Jul 13, 2011
I have a lot of filenames (strings) following the same convention
m02_+1+7_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
[code].....
What I want to do is to create a script that will interpret the following string and save into variables part of its name
m02_+1+7_London_0000$01.cfg as
------X-Y--City---------
X=1
Y=7
City=London
[code]....
then I want to copy the files that go all the files with the same City and X and Y to the same subfolder City/MX.Y I will need some help start doing that. And I think the first would be to get part of the filenames strings into variables.
View 3 Replies
View Related
Oct 21, 2010
i have one questions :"bash copy filename destin_dir"1- i need a bash script to copy file from one directory to another , and if the destination directory have the same file name, add '_1' to the file name ..and if there is a file with 'filename_1' , add '_2' to the file name and become 'filename_2' and so on
View 5 Replies
View Related
May 17, 2010
I just bought a new 2 TB hard disk to replace my old 175 gig one. I currently am dual-booting Lucid Lynx and Windows 7, and rather than go through the process of reinstalling both, then reinstalling all my programs, settings, and everything, I was wondering if there's a way I can just copy the partitions on my 175 GB disk to the new one, grow them to fill up the rest of the free space on the new 2 TB disk, and then plug that HD into the primary master plug on my motherboard... will that work?
View 4 Replies
View Related
Sep 30, 2010
I have an old Dell Dimension 2400 with XP that has a WD 40GB model# WD-XL80SD-2 that has run out of space now matter how hard I try and keep it clean. I called Tigerdirect this morning and ordered a Hitachi 500GB hard drive model# OF10381, here's my dilemma. I really want to just do away the old hard drive and use the new one but it seems as if there's not a real good way to copy the entire hard drive including the OS. I have been told that you can use a program such as norton ghost to do it. I do though have a Windows 7 disc, I am going to use a SATA host PCI card to connect the new HD. if I should back everything up from the old HD except for the OS. And then unplug the old HD and just do a fresh install with the Windows 7 disc.
View 9 Replies
View Related
Mar 14, 2011
I'm mostly a linux-idiot but I tried to get an update for a laptop that was running xubuntu. Anyway, it won't boot and instead takes me to a screen where it says "press s to skip mounting, or press m to recover manually" or something like that. I've pressed S, and then it tells me that it can't find /tmp or something, and I have to turn it off and back on to do anything. Pressing M doesn't help much either... at least not for a mostly-linux-idiot like me. I would do a clean install, but there are a few files I absolutely have to have from the hard drive. recover the files I need from my hard drive to a usb drive while using a Live CD?
View 9 Replies
View Related
May 4, 2011
Ubuntu is getting stuck at the loading screen after an aborted attempt to upgrade to 11.04. It's my own fault - the install was running out of room on /, and I, like an idiot, decided to delete some package files under /var/something/archive, thinking they were "old"... I quickly realized they were in fact the new packages being installed... anyway after killing the thing and rebooting it is pretty damn broken (mostly because I can't get networking going so running in dpkg repair mode doesn't do much because, well, I deleted the packages).
I want to copy all the files off my /home and other meaningful partitions onto an external drive so I can just do a clean install. I can actually login to the command line under recovery mode, but I can't get the GUI started. I know it's possible to copy the contents of the partitions to an external
View 9 Replies
View Related
Nov 20, 2008
I'm connected remotely with Putty to a linux server and I need to get the files from a directory on the server onto my hard drive on my laptop. I don't know what the secure shell command is to download it or what exactly I need to do so I can get these .root files from the server copied onto my local hard drive.
View 2 Replies
View Related
Jan 3, 2009
They filled up the hdd and need more space. I first considered just adding a slave drive, but thought it might be better just to copy all of the content from the old drive to the new drive. Then, make the new drive as the master and the old as a backed up copy slave drive.
View 14 Replies
View Related
Mar 12, 2009
I am hosting some VPS, and I am wondering the best way to copy the VPS data to a secondary hard drive mounted on /backup on a daily basis.
View 5 Replies
View Related
Aug 25, 2010
I've been trying to sort this out for several hours and I?m totally lost? I?ve been searching around, but haven?t found the solution to my problem. I have a directory with 100 files. I need to copy 10 lines of each files (let?s say from line 45 to 55) into one unique file. So I guess I could use sed ?w, but I didn?t manage to write the right script. I also tried using a loop to create 100 different files, each one with the 10 lines) to concatenate them later on. But I only got 1 file, not 100.
View 12 Replies
View Related
Mar 29, 2010
I have to copy some log files with a cron job; I'd like to copy only the newer files added because I run the script with a weekly cron. all the log files are named like "10-03-29.CVS" and reside in a dir. When I copy I'd like to copy only the files not already copied with the last cron job.
View 8 Replies
View Related
Sep 21, 2010
Wondering if any know of a program that I can use to make an exact image of my fedora 13 operating system and transfer it to my new hard drive. I want to upgrade the hard drive and reinstall the exact system from the original drive to my new one, without starting from scratch. Just wondering if there's a program for Fedora 13 like Norton Ghost.
View 3 Replies
View Related
Feb 5, 2010
Is there any software that will create an image of my Hard Drive and put it on DVD as it is and if I had to reinstall I could use that image?
View 5 Replies
View Related
Aug 14, 2010
I wish to copy to my external hard drive on Shut Down each day the files that I've changed in my Documents folder since start up.
View 1 Replies
View Related
Nov 26, 2010
I want to copy my home video DVD's to my hard drive and I want the format to be in an mpeg format (I suppose I should want mp4). The DVD's are in some sort of VOB, IFO format....or whatever they're called.There are many chapters on each of the DVD's and I want each of the individual chapters copied to the hard drive so I can rename the files something like, "fishing.mpeg" or "skiing.mpeg" and not some huge 3 gb file.
K9copy does a fair job but won't complete it. That is- k9copy gets 86% encoding done (I think that's the word for it) but won't finish copying the remainder of the chapters.
View 9 Replies
View Related
Dec 12, 2010
I would like to copy some of my dvd movies to my external 1tb hard drive what program should I be using or is there a work around I should follow.
View 3 Replies
View Related
Jan 16, 2011
I have a very specific issue that I am having trouble resolving. I have an old laptop and a new laptop with a smaller HDD. I want to copy the windows partition from the new lappy to the old bigger HDD so I have room for Ubuntu. All of my files are on a Maverick install on the old lappy. How can I get all my files and windows to the old HDD and into the new laptop. I am a little stuck on this one because of my limited options.
View 8 Replies
View Related