Say I have a tarball ~/foo.tar
containing
foo/
foo/bar.txt
foo/baz.txt
foo/qux/
foo/qux/corge.txt
foo/qux/grauply.txt
And in my home directory ~
I have an existing foo
directory and the existing files
foo
├── bar.txt
├── elvis.txt
├── presley
│ └── graceland.txt
└── qux
└── corge.txt
If I extract this tarball in ~
, the following files will be overwritten:
~/foo/bar.txt
~/foo/qux/corge.txt
Is there a simple one-liner that will list those files for me?