Wie kann ich das in der Kommandozeile machen?
zB kopieren , /dir/another/fileum /tmp/so habe ich/tmp/dir/another/file
Wie kann ich das in der Kommandozeile machen?
zB kopieren , /dir/another/fileum /tmp/so habe ich/tmp/dir/another/file
Antworten:
cp --parents /dir/another/file /tmp
wird genau das tun, was Sie wollen.
brew install coreutilsgcp --parents /dir/another/file /tmp
rsync kann dabei eine gute Hilfe sein:
rsync -Ravz my/first/dir/file.txt another_dir
wird als Ergebnis gegeben
another_dir/my/first/dir/file.txt
Sie können tarPfade beim Kopieren von Dateien beibehalten:
tar cf - /dir/another/file | (cd /tmp && tar xf -)
--parentslebe nicht hier; (