Programming :: Bash / Perl : Copying Data From A CD/DVD To Hard Drive?

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


ADVERTISEMENT

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 View Related

Ubuntu :: Bash Copying Files From One Drive To Another?

Nov 15, 2010

I've got two external hard drives, a 2TB and a 320GB. I've recently come from Windows 7. On Windows 7 I wrote a batch file which checked whether both hard drives existed and then copied a couple of folders from the 2TB to the 320GB without overwriting. I've been trying to work out how to do the same under Linux without much luck. I've tried rsync but it looks like it overwrites. Does rsync overwrite?

If it helps, the batch file I wrote in Windows

if exist D:320GBDrive (if exist H:2TBDrive (xcopy H:2TBDrive* D:320GBDrive /I/E /-Y < C:decline_copy.txt))

Which basically checks for drive D:, checks for drive H: and then copies the contents of the folder on drive H to drive D and says no every time it asks to overwrite.

View 2 Replies View Related

Fedora :: Copying Data From A (western Digital) Usb Drive (ntfs Partition)?

Feb 20, 2009

I'm actually not a Linux newbie, but I'm DEFINITELY no expert either... I'm trying to copy all my data(approx 50 GB) from a usb drive(western digital 250GB) with ntfs partition in one go... The problem is that it only fails for big transfers... works fine for smaller transfers like 1Gigs or less... I have just one internal hdd partitioned into two ext3 partitions.. so I have sda1(Primary.. mount pt /), sda2(swap) and sda3(mount pt /piyush)... The usb drive comes up as sdb(sdb1).. just has one ntfs partition... I've also installed the ntf-3g drivers.... but doesn't seem to work... I've also noticed that when the machine hangs and I try to shut down, it fails and I get a message again again... (sdb1- no sense detected) or something like this... don't remember the exact message... will post the exact one if no one is able to figure out what's wrong...

View 4 Replies View Related

Ubuntu :: Copying Files To External Hard Drive?

May 19, 2010

im trying to copy a file over to my external hard drive and its a 5.8gig file and i keep getting this error saying there was a file copy error and then i click show more details and says Failed to attach the file: File too large

View 3 Replies View Related

Ubuntu :: Error While Copying From Hard Drive To Usb Stick?

Jul 11, 2010

when I am trying to copy any of my files to usb stick, it gives me this alert: the folder cannot be copied because you do not have permissions to create it in the destination.

View 2 Replies View Related

Ubuntu :: Copying Files From A Hard Drive Using Another Computer?

Aug 4, 2010

I got a problem with the motherboard of my computer and now I need to get some files out from the hard drive (an ext3 partition). I can access the files from another computer but because of the permissions of my user it doesn't let me copy the files over to another drive.

my computer was running Kubuntu 8.10 with a Vista dualboot. I also tried attaching the hard drive to another laptop, but because of the video drivers the display doesn't function properly.

View 4 Replies View Related

General :: Copying Files To An External Hard Drive?

Nov 21, 2008

I want to copy a .tgz file from my computer to an external hard drive. However, I get the following message:cp: cannot create regular file `/mnt/usbkey/ws_2008/misc/minipar-0.5-W indows.tgz': ermission deniedI get this error with any file I try to copy to the external disk. rnal disk is recognized, when I mount it, I can see the files and folder I have there, but seems that I cannot copy anything to it.When I try to copy the same files from my computer to a usb flash drive, everything works

View 9 Replies View Related

General :: Copying Files From One External USB Hard Drive To Another?

Jul 30, 2011

I have two USB 2 external hard drives. I want to copy about 30 gigs of data from one to another. What command line command do I use ? I was thinking of using cp with the -R and -n options, but I have no idea what devices to refer to. I can't find any external hard drives in /etc/fstab and I'm not sure what /dev device each USB external hard drive uses. I just want to copy the files and the directories that they are in just as they are. There are no links and I do not want to do a backup.

View 10 Replies View Related

Programming :: Copying Data To Clipboard Using OSF/Motif, C++, And XRT Table?

Dec 23, 2010

I am working on an application in Motif and C++, which uses an XRT Table. With the XRT Table being an infrequently used product, it is hard to find good documentation on it, and one area in particular is sorely lacking... a good explanation on how to copy text from the table to the clipboard used by other X11 applications. I've come across an example application that demonstrates how to copy text to the clipboard, but I cannot seem to merge that knowledge with what I'm provided with the XRT Table API. Does anyone have any knowledge in using the XRT Table, and in particular, with copying selected fields within the table to the clipboard?

View 3 Replies View Related

General :: Copying A Partition From One Hard Drive To The Same Partition On Another Hard Drive

Mar 23, 2010

I am trying to move a whole bunch of files from one partition on one hard drive to the same partition on another hard drive. Can I mount the same partition (same name, different drives, i.e. /data on /dev/hda1 and /data on /dev/hdb1)and copy those files? Shutdown the server, take out /dev/hda1 and boot up with the new drive and it's /data contents.

View 1 Replies View Related

Ubuntu Multimedia :: Copying DVD To Hard Drive Without Compression Using K9copy

Jun 2, 2011

I finally got K9copy to work and I'm using it to extract DVDs to my hard drive. I extract a dual layer DVDs it becomes a 5GB DVD. In the settings, I have DVD size as 9GB because I assumed this would not cause any compression. When I use k9copy assistant to change the shrink factor before ripping, I can only change the shrink factor of some titles to 1.67 from 2.50. I want the shrink factor to be 1 since this seems to ensure that the output of the file is the same size as the title on the dvd. I want the copied DVD to be the same size as the original. I have no problem with hard drive space since I have 6 terrabytes of free space.

View 6 Replies View Related

Programming :: Bash And Perl - Script Adjustment

May 24, 2010

I wrote this script for bash & perl. If you run it in bash it should work. It changes title - (uuid) kernel - initrd ... to title - uuid UUID=the_uuid... kernel - initrd .... When I wrote it I replaced end of lines by . It's the second $block definition. But now I need to repair it, because I will work with the 1st $block definition. That is not to exclude end of lines, but leave it be untouched. Now when you escape the second $block definition, the code does not work. What I have to do to repair it working with multiline input data?

Code:
block="title Sata Mandriva
kernel (UUID=eab515e9-bc3e-4024-9f01-55fddaa0fb1c)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=eab515e9-bc3e-4024-9f01-55fddaa0fb1c resume=UUID=e12487ff-6d6f-44c4-9e03-33f545b3b798 splash=silent vga=788
initrd (UUID=eab515e9-bc3e-4024-9f01-55fddaa0fb1c)/boot/initrd.img"; .....

View 10 Replies View Related

Ubuntu :: Existing Rsync Running And Copying Info To Hard Drive?

Nov 30, 2010

I have a home network that includes a couple of computers {A, B, C, D}. currently, I have a cron jon that runs every minute and updates (using rsync) the hard drives of computers {B, C, D} with the contents of hard drive {A}. So far everything works great, as hard drive {A} barely has any information on it. Now, I am about to copy a lot of information (about 8 GBs) to hard drive {A}. Naturally, the cron job will run (as it runs every 1-min) and try to 'sync' the contents with hard drives {B, C, D}.

Given my network (100Mbit/sec), there is no way the cron job will be able to 'copy' the contents to hard drives {B, C, D} in one minute. It will take much more time. Does this situation create a problem? meaning, will cron re-run a new rsync instance 1min later, even though an existing rsync process is running and still copying information to hard drives {B,C,D}? Will my backups be hurt / slowed down tremendously because of this?

View 2 Replies View Related

Programming :: Easier Way To Color Text In Perl Like BASH?

Apr 8, 2010

I've been trying to figure out a way to more easily color text in Perl like I do on Bash on a Linux box. In bash, what I'll do is set color variables up to equal the escape sequence, then echo out with escape seqeunces to print it exactly how I want it. Typically I'll want a character or a word in a different color, not the whole line. For example

echo -n -e "My face is turning ${RED}red${UNCOLOR} like a lobster." In Perl with the term::ANSIColor module, it seems to just do a line. Am I being dense? Is there a way that I can do it like I do it in BASH that's fairly easy to read after the fact?

View 11 Replies View Related

Programming :: Find Out If X11 Is Running From Within Perl OR Bash Script?

Mar 17, 2010

I am writing a script based image manipulator but i need to know if X is running so i can tell if i use CACAVIEW to imagemagick DISPLAY command.

View 14 Replies View Related

Programming :: Looking For A Bash / Perl Script To Read New RSS Feeds (XML Url)?

Feb 13, 2011

I would like to find something portable that work on all machines. I have hmtl2text installed, and perl and sh.

Anyone would know if someone already made such thing to read new through the console ?

View 1 Replies View Related

Programming :: Manipulating A Date In A Perl Bash Script?

Mar 11, 2010

I've recently inherited a bunch of files at a new job and am trying to figure out some of the problems that have constantly popped up. The one i'm getting a huge headache with results from a bash script that is supposed to change a date format from a client populated txt field to one we want defined a certain way. Everything in the script works fine, except that one function. Below is the line i'm trying to manipulate, with date examples.

sed -e 's/.0000 EA/ EA/' -e 's/ 01012010 / 01-JAN-2010 /' -e 's/ 12312011 / 31-DEC-2011 /'

The one caveat is that the first date is non-static and changes daily. It is, however, always the current date. If it helps, the second date will always be a year away from the first date.My idea was to pull the current date via perl's DATE function, but...how to do it, and calculate a year away without throwing the rest of the bash script off? Any help would be appreciated. I'm sure it's a simple solution but i know absolutely nothing about these scripts and how they were written.

View 10 Replies View Related

Programming :: Scripting, Perl Or Bash; Run A Background Process, Get Pid?

Apr 1, 2010

pretty simple. how would you background a process from a script and get its process id at the same time?

View 6 Replies View Related

Programming :: Sed Bash Command - Not Print Backslash In Perl

Jul 11, 2010

This pretend to be a script for rename a lot of files automatically. So I put the list of files in an array named @lista. But, as you can see, at the end of the command I use a sed filter to print out a backslash for those files that have spaces in their names, so the path for those files could be rightly interpreted.

But there's no way I could print a backslash. It works well when I use the Perl's sed substitution s///, but I need every path in the array to be fixed.

I'd like to add that the bash command works perfectly well alone. I mean outside the Perl script.

This is de command line with the sed filter:

Code:

And this is what it brings:

Code:

View 12 Replies View Related

Programming :: Randomly Selecting 160 Lines Within A Data Set Of 1000 In Perl

Apr 11, 2011

I have a dataset of around 1000 lines. Out of these 1000 lines I need to pick randomly 160 lines of data and write it to a file. The program is needed to eliminate data bias when I run the program through a reanalysis program. I am thinking I need to use the rand or srand term, but I am having difficulty writing this in perl. I have to write it in perl, because the rest of my scripts for this project are in perl, so consistency is important. The data only consists of one column of the data (YYYYMMDDHHHH).

View 2 Replies View Related

Programming :: Perl: Compare CGI Input With Data From A MySQL Table?

Nov 19, 2008

I have this program:

#! /usr/bin/perl
use DBI ;
use strict ;

[code]....

and I get this error simply running the program from the command line: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./submit.cgi line 24.

is this the right syntax to use, both, for this line:

my (@param) = $cgi->param("firstname","lastname","type") ;

as well as this one:

$sth=$dbh->prepare ("SELECT firstname,lastname,type FROM dts WHERE firstname LIKE $param[0] AND lastname LIKE $param[1] and type LIKE $param[2]" );

or should there be quotes around the $param[0] or something? (also is it $param[0] or $param(0)?)

View 1 Replies View Related

Programming :: Get Data From Multi Lined Text File Using Awk / Sed Or Perl - Grep And Cut Not Upto Par?

Jul 1, 2010

I need a loop that pulls out the user name into a variable and then pulls out the LastUpdate field into another variable so I can then perform a comparison against the last update field. Requirements are AIX tools including AWK, SED and Perl I am writing a script to check AIX users password expiration dates and if they are within the alerting period (ie. 7 days etc) it will email the user. I will release the full script into the public domain once completed. The text file I want to parse is formatted like:

Code:

colettel:
password = XSON0m4SdIQDw
lastupdate = 1260829398
andrewwa:

[code].....

View 4 Replies View Related

Programming :: Find And Replace A String In A File Using Perl Command From Bash Script?

Feb 14, 2011

I wanted to find and replace a string from a perl file. I have written a script in bash which runs the following command.

perl -pi -e "s/$findstring/$replacestring/" testfile
where as $findstring = print F_WC_TMP"$line
";
and $replaceString = $line = join ' ', split ' ', $line; print F_WC_TMP"$line
";

But when I am running the above command, i think it is replacing the $findstring with the above mentioned string and hence it contains a $line, it is looking for the variable $line and not finding the exact string. I am confused about how to search for a string that contains $ in it and replace it with another $string.

View 5 Replies View Related

Programming :: Talented Coder To Program Bash / Perl App That Plays SWF On HTML Page?

Feb 10, 2011

Everyone knows that it is like impossible to use mplayer to watch an *.html file. OK.

For instance here is a cool example of lot of streaming for firefox
http://watchtvlivestreaming.com/tvlive/b5499

Code...

Anyone is there a talented bright coder, coming from hell -because it is really difficult, to make such console program ?

View 1 Replies View Related

Programming :: Perl About System Command / Fails If The Standard Shell Is Dash And Not Bash?

Jun 30, 2011

I am trying to fix a perl script, and I really suck at perl. But I think this problem will be easy for people who know it.

The problem is, I have an old setup script someone wrote many years ago. It fails if the standard shell is dash and not bash. The only way I've gotten it to work is to point /bin/sh to bash. I looked thru the script and it uses "system" many places, and I think that's the problem.

I searched for it and found this link:url

My plan is to include this function:

Code:
sub system_bash {
my @args = ( "bash", "-c", shift );
system(@args);
}
Then I could simply change all calls to system into system_bash and it should work?

The parameter to the system calls is usually some variable. What if the parameter is a list already? Do I need to test for it somehow, and if it's a list, prepend "bash" and "-c" to the list? How do I do that?

In the script there are lots of places like this:

my $error = system($cmd);
if ($error) {
die/warn "some error message";
}

Shouldn't there be a return in the system_bash function?

View 8 Replies View Related

Programming :: Bash/Perl Script - Provide List Of Hosts To Choose From And Ssh To Chosen Host?

Apr 6, 2010

I'm not sure if this is best done in Perl or Bash. I'm thinking surely someone else has created something close to what I'm looking for. The results of the script would be that someone would kick off "linux_hosts.sh" r whatever you want to call it, then a top "folder" of options (with hosts contained within each of these top menu choices), then, based on which number corresponds to that top level, they're presented with a set of linux hosts that are relevant to that top level name. Example:

$ linux_hosts.sh
1. VMware hosts 4. Private Domain
2. ESX servers 5. Red Hat boxes

[code]...

View 4 Replies View Related

Ubuntu :: Recovering Data From An Old Hard Drive ?

Jul 4, 2010

I have recently gotten hold of a device that helps me plug my old ATA/IDE hard drive to my computer and view my old files that I wish to recover. I am using Ubuntu and the harddrive that I wish to retrieve the data from also has an Ubuntu install on it. The files I wish to recover are old .doc files, which I want to keep to remember my old writings.

The problem I have encountered arises when I wish to open some of the files. The icon for some of the files, which happen to be my best writings, has an X on the top right, indicating that I cannot view the contents. When I click on the files, the following error message pops up: "Access to /media/c885571b-a6e5-4a2d-937a-78af7050910/george/Courses/hist388/Passion.doc was denied."

Now, I am guessing that I need to be able to log in as superuser or something to be able to access these files, so I logged in my terminal as super user by following the instructions outlined on this page: [url]

I still did not have the sufficient access required to be able to open the files that I would like to retrieve.

View 2 Replies View Related

Ubuntu :: Hard Drive Fills Without Data?

Sep 27, 2010

I have the strangest issue where my HDD reports full, but I can only account for about a tenth of the data.

Specs:
Ubuntu 10.4
laptop Toshiba Tecra A11
HDD 250GB
4Gb RAM
/home 20.3GB
/usr 2.4GB
/var 742MB
/lib 132.9MB
/opt 71.3 MB
/boot 15.4MB
/etc 14.2MB
sbin 7.4MB
bin 6.4MB

The rest are below a MB. This system is not a dual boot so 241Gb is ext4 and 8.9Gb is Extended and 8.9GB is Swap. This system has been loaded for about a month, when I initially loaded it there was 230GB free.

View 9 Replies View Related

Ubuntu :: Backing Up Data On A Second Hard Drive?

Jul 28, 2011

So, I recently acquired a second hard drive (1.5 TB) and I wish to partition Ubuntu 11.04 with Windows 7. I've set everything up properly and using the Disk Utility in my System Settings I've created a 1 TB partition which I want to use for Linux. I think it has the proper partition type but how do I exactly go about transferring all my files from the hard drive I'm using now to the partition I would like to have?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved