mainGNU tar - Support: sr #109180, Overwrite option

 
 

sr #109180: Overwrite option

Submitter:  Alexander Chikovany <justrp>
Submitted:  Tue 08 Nov 2016 06:48:33 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 Nov 2016 09:34:23 PM UTC, comment #1: 

I'm sorry, have a typo in last sentence:
< "mydir/dir-will-be-link is symbolic link to /dev/null"
should be

> "mydir/link-will-be-dir is symbolic link to /dev/null"

Alexander Chikovany <justrp>
Tue 08 Nov 2016 06:48:33 PM UTC, original submission:  

Hello.

I've asked for help at -email is unavailable- and Pavel Raiskup said that option I need is not implemented, so I will post about it here.

I think, tar should have an option to overwrite files (any type of files: files, directories, symbolic links, etc) if there were any changes (like if content of file was changed or type of file was changed).

For example, I will archive my directory with subdir with file1 and symlink "link-will-be-dir". After that, I well add file2 to my subdir, remove symlink, create directory with same name as link I had ("link-will-be-dir") and create file inside of it.
Now, I want to extract my archive into that dir - and have file1 and file2 inside of subdir - and 'link-will-be-dir' as directory (since it was directory when I had packed an archive):
➜  ~ mkdir -p mydir/dir-with-files
➜  ~ ln -s /dev/null mydir/link-will-be-dir
➜  ~ touch mydir/dir-with-files/file1
➜  ~ tar -cf mybackup.tar mydir/
➜  ~ rm -f mydir/link-will-be-dir
➜ ~  mkdir -p mydir/link-will-be-dir
➜  ~ touch mydir/dir-with-files/file2 mydir/link-will-be-dir/file-should-be-deleted-after-extract-since-its-parent-dir-become-symlink
➜  ~ tar -x --some-awesome-flag mybackup.tar
and now i want it to have:
mydir/dir-with-files contains file1 and file2
mydir/dir-will-be-link is symbolic link to /dev/null

Alexander Chikovany <justrp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by justrp (Submitted the item)
  • -email is unavailable- added by justrp
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-08 justrp Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code