Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to compress a set of files without duplicating them (i.e., I want to choose 'compress' and see the files I want compressed disappear into a zip file or other format).

I ask because I have some problem files/folders that Finder cannot delete, and I've tried tens of methods, command line, and standalone apps. I found that when compressed, Finder can delete the archive, but uncompressed, it cannot delete the files/folders, and they remain because compression programs effectively duplicate the content when they compress files/folders into a single file.

It may see a wierd way to go about solving the root problem, but it's the last shot for me. So please, answers only to my original question. Thanks

share|improve this question
    
If finder can't delete them, then the archival tool probably can't delete them either. –  Darth Android Oct 31 '12 at 21:18
    
Darth: You misunderstand. Finder can delete the folders/files when they are archived. So I want to archive without duplicating (i.e, without leaving the original files/folders and adding an archive). Am I clear? I don't need the archival tool to delete anything –  Ian Douglas Oct 31 '12 at 21:20
    
You misunderstand archiving: Fundamentally, archiving creates a copy of the files. At best, the tool can opt to delete the original files after it's done copying & compressing them into the archive. If Finder can't delete the originals, then the archiver probably can't delete the originals. Finder's ability to delete the archived copy of the files doesn't really matter. –  Darth Android Oct 31 '12 at 21:22
    
For what it's worth, this sounds a lot like a permissions issue. If you view info on the files, who owns them and what are the permissions? What about the owner/permissions on the directory that contains the files? –  Darth Android Oct 31 '12 at 21:24
    
I understand archiving fine, which is why I'm asking the question. My question is whether there exists an archiving tool or method of using the common ones available that works on the original file INSTEAD of a duplicate. Thanks for your response. –  Ian Douglas Oct 31 '12 at 21:31
show 6 more comments

1 Answer

Typically, deleting files after compression is achieved with something like zip -m, but I don't think this will be what you want. If the standard delete or rm won't work, quite likely, this won't work either -- the archiver should call the same routine to do deletion...

share|improve this answer
    
Thanks for responding, but I don't see the relevance. When compressed, the Finder can delete the archive of the problematic files/folders just fine. The problem is that the archive tool when creating the archive (which can be deleted) duplicates the original files/folders. I just wish it would work on the originals, because then the Finder could delete them, in a compressed form. –  Ian Douglas Oct 31 '12 at 21:39
    
@Ian Compression and file permissions do not work like that at all. If Finder can't delete the file, then it doesn't matter what the contents of the file are, be they compressed or not. I assure you, it is not that Finder 'can't delete uncompressed files'; There is a permissions issue that is preventing you from deleting the files, which is why I asked you to check what the permissions were for the directory that contains the files, which I suspect you don't have write access to. –  Darth Android Oct 31 '12 at 21:40
    
FYI, Darth, file permissions was the first thing I thought of at least 10 stages ago. Even files I have apparent Read/Write permission for are not deleting. It's not global, but restricted to 1GB of redundant files/folders on a 500GB drive –  Ian Douglas Oct 31 '12 at 21:47
    
@Ian R/W on the file doesn't matter; you need write permission on the folder. –  Darth Android Oct 31 '12 at 21:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.