If you find that the reason you can't tar a big file is that the file system sets a limit, it would seem reasonable to conclude that you ought to be able to tar it in smaller pieces. tar | split will allow you to break up the tar file in fragments which you can cat together at the other end.
Last edited by era; 04-27-2008 at 09:25 PM..
Reason: Yes: for a change, a useful cat! (Sorry, couldn't resist)
If you find that the reason you can't tar a big file is that the file system sets a limit, it would seem reasonable to conclude that you ought to be able to tar it in smaller pieces. tar | split will allow you to break up the tar file in fragments which you can cat together at the other end.
I have GNU tar and GNU split and GNU tail. I don't know if those are available for SCO (lawsuit time? <ducks>) but you might be less lucky with the built-in variants, for example in whether split accepts human-readable big numbers (I calculated 1024*1024*512 and put that in here, but GNU split would allow simply "512m") and, more crucially, whether it can read standard input when you say "-"
Split demonstrated:
Archiving:
-d means use numeric suffixes, -a 4 means create suffixes of length 4, -b bignum is how big each file can be.
Dearchiving:
Make sure you have enough digits in the suffix so that cat will not put them in the wrong order! I believe the wildcard should expand to an alphabetic list on all platforms.
I've done this when I had to make backups to an USB drive which was FAT formatted so it only accepted (IIRC) max 2 gigs in one file, but this is untested, from memory.
I suggest you try to create a big file with dd like fabtagon proposed, just to check that your coordinates are not completely off.
Last edited by era; 04-28-2008 at 04:30 PM..
Reason: Test with dd first
Hello,
I need to move all the files inside /XYZ (has multi-depth sub directories) that are older than 14 days to/ABC directory but with retaining the SAME directory structure.
for example:
/XYZ/1/2/3/A/b.txt should be moved as /ABC/1/2/3/A/b.txt
I know about find /XYZ -type f -mtime +14... (3 Replies)
Hello Team,
We would like to backup a lot of files inside of a structure of directories, four, five or more levels in some Ubuntu, Mac and Solaris systems.
For instance:
/home/chuck/sales/virgin/rent-quote.pdf
/home/chuck/sales/marriott/vacation-quote.pdf... (2 Replies)
Hi,
I have tar filw which has multiple directories which contain files.
When i extract using tar -xf the directory structure also get extracted.
I require only files and not directory structures as there will be overhead of moving the files again.
So i searched here and got a solution but... (4 Replies)
How do I write a bash or ruby or perl or groovy script to print all the files in my directory tree that are one-to-two years old, the size of each file, and the sum of file sizes and then delete them?
I was using
find . -atime +365 -exec rm '{}' \;
but the problem was that I could not... (5 Replies)
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
i have a text file as.
/database/sp/NTR_Update_Imsi_List.sql
/database/sp/NTR_Update_Imsi_Range_List.sql
/database/sp/NTR_Vlr_Upload.sql
/database/tables/StatsTables.sql
/mib/ntr.mib
/mib/ntr.v2.mib
/scripts/operations/ntr/IMSITracer.ph
/scripts/operations/ntr/IMSITracer.pl ... (3 Replies)
Hi,
I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Hello,
I am new to shell scripting and would really appreciate if someone could help me with this question.
I have a directory structure as follows..
main directory is DATA under which i have different directories names fileserver01, fileserver02 ... till fileserver 15.
under each... (8 Replies)