On Tue, Oct 13, 2009 at 4:02 PM, Kent Johnson <ken...@tds.net> wrote:
> On Tue, Oct 13, 2009 at 2:58 PM, David Eric <cii...@gmail.com> wrote: > > printing the command line, > > would it be > > print('gzip {0} {1}'.format(target, ' '.join(source))? > > Yes, or just > print zip_command > > > and as far as using the tar command, > > i have three files, > > file1,file2,file3 > > i wanted to preserve that structure, doesnt tar combine everything into > one > > file? > > Yes, tar makes a single file. Do you want to preserve the individual > files? Why did you have the .gz argument in your command line? Is that > supposed to be a directory name or a file name? > > My understanding of the man page is that gzip *replaces* files with > their gzipped version, so I guess if you want to back up a directory > to gzipped files you would have to first copy the directory, then > gzip. > > BTW you might like to look at the zipfile module as an alternative to gzip. > > Kent > > PS Please Reply All to reply to the list. > yes Dave told me to stop top posting and CC tu...@python.org..sorry about that i didnt know. as far as print zip_command, i would add that to the program however, doesnt just declaring it actually trigger it..thus it would executed and the command line would get printed as well? the actual program i was looking to write would take: file1,file2,and file3, in /Users/davidteboul/bin/python and condense them into individual files; file1.gz, file2.gz and file3.gz and save them in a directory already made - (/Users/davidteboul/backups) ps..did i post and reply all corretly?
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor