LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   dd question - split files (https://www.linuxquestions.org/questions/linux-software-2/dd-question-split-files-232492/)

Sn7 09-19-2004 10:09 AM

dd question - split files
 
Hi

I'm doing a backup of my drive (HDA1), how can I split the files because it can't grow larger than 2Gb?

I'm currently doing dd if=/dev/hda of=/mnt/hdb/backp/backup.img

Thanks

Vookimedlo 09-19-2004 10:24 AM

Hi,

cd /mnt/hdb/backp/
dd if=/dev/hda | split -b=2000m


first chunk of data is named xaa, 2nd is xab an so on

Logomachist 08-29-2009 11:56 PM

Is that really the best solution?
 
I have the same objective.

Is that really the best solution? No way to do it all in one step? I suppose if it works I shouldn't complain but it looks rather inelegant to me.

i92guboj 08-30-2009 12:01 AM

If you think it's inelegant you are going to suffer a lot, because that's the philosophy of Linux for the most part. Most Linux tools don't do a thousand things, they do *one* thing* and do it well. Then you combine them to achieve your purpose.

You could find a GUI frontend to this tools that do the work in a more graphical way (I don't know of any, but it may exist), however the steps behind the scenes will be mostly the same, you just won't see them.

Logomachist 08-30-2009 04:09 AM

I have mixed feelings about Linux's design philosophy.
 
Yeah, I have mixed feelings about Linux's design philosophy. I LIKE that commands can be chained together in original ways. But you know that 80/20 rule, right? I think they could have anticipated that users would have wanted to specify filenames and span images across multiple files and included these features accordingly.

Actually, somebody did... I found a utility called dcfldd that's like dd but can split files. This has happened before; I've found enhanced versions of grep and ls online that do things I found lacking from the originals. But for some reason these enhanced versions aren't included by default in Linux distros.

i92guboj 08-30-2009 04:42 AM

Quote:

Originally Posted by Logomachist (Post 3662639)
Yeah, I have mixed feelings about Linux's design philosophy. I LIKE that commands can be chained together in original ways. But you know that 80/20 rule, right? I think they could have anticipated that users would have wanted to specify filenames and span images across multiple files and included these features accordingly.

We could argue about what's better forever, the truth is that there's as many different views as there are users. I say that there's a command for that, so why bother coding that feature again and again and again in every single program? Obviously it's not the only way to look at the issue, and everyone is free to disagree. I don't claim to have the truth on my hands. Everyone has his/her own truth.

Besides that, if that truly bothers you, just use split directly and be happy with it:

Code:

split /dev/hda1 -b 700m
Quote:

Actually, somebody did... I found a utility called dcfldd that's like dd but can split files. This has happened before; I've found enhanced versions of grep and ls online that do things I found lacking from the originals. But for some reason these enhanced versions aren't included by default in Linux distros.
There are also ways, as said, no one can say if it's better to have programs with lots of features, or lots of programs with just one feature. No one can say either when is a good time to stop. You say that dd should be able to split files, some other person will think that it should compress the files in bz2, some others will want 7z support, some others will want ghost image supports, some others will want dd to be able to change the internal fs format of an image, some others will want a graphical frontend, and where do we stop? Who decides what feature is ok and what isn't?

Well, that person is the author of the program. If you don't agree, you can always fork it, that's why "improved" versions of typical gnu tools do exist.


All times are GMT -5. The time now is 01:52 AM.