Timeline for How to tar all file contents only, into a flat archive?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 30, 2018 at 4:23 | vote | accept | Philip Miller | ||
| Jun 30, 2018 at 1:42 | answer | added | EchoMike444 | timeline score: -1 | |
| Jun 29, 2018 at 4:06 | comment | added | schily | The command star -c -f /tmp/out.tar -s^*/^^ somedir does what you like. If you like to avoid empty directories to appear in the archive, use: star -c -f /tmp/out.tar -s^*/^^ -find somedir ! -type d | |
| Jun 29, 2018 at 1:57 | comment | added | Philip Miller | find <src> -type f -name '*.<file-extension>' -exec cp -at <des> {} + | |
| Jun 29, 2018 at 1:52 | comment | added | muru | @PhilipMiller with the find options, you could just remove the -maxdepth 1 to enable recursion. | |
| Jun 29, 2018 at 1:49 | comment | added | Philip Miller | Yeah. It seems like I'll have to $ find the files and put them into a temp directory then just tar that directory instead. | |
| Jun 29, 2018 at 1:34 | comment | added | steeldriver | With GNU tar, you could use --transform to strip the paths - however the resulting archive would still include the (then empty) directories I think | |
| Jun 29, 2018 at 1:30 | comment | added | Philip Miller | Yes, but that question is asking for just the files in the base directory. I want to recursively get every file in the directory including the files in its sub directories. | |
| Jun 29, 2018 at 1:05 | comment | added | Tyler Chambers | Have you tried these unix.stackexchange.com/questions/24870/… ? | |
| Jun 29, 2018 at 0:59 | review | First posts | |||
| Jun 29, 2018 at 1:07 | |||||
| Jun 29, 2018 at 0:58 | history | asked | Philip Miller | CC BY-SA 4.0 |