tar
-
Exact copy a huge directory into the different one in linuxComputer/linux 2017. 3. 15. 06:34
I have ifc1410-ioxos-161103 in /export/nfsroots/, and would like to copy the entire dir in the different name. $ mkdir ifc1410-ioxos-161103-rules-test $ cd ifc1410-ioxos-161103 $ sudo -E tar cf - . | (cd /export/nfsroots/ifc1410-ioxos-161103-rules-test/ && tar xBf -) Reference http://www.linuxdevcenter.com/pub/a/linux/lpt/18_16.html
-
untar a tar file into a specific directory nameComputer/linux 2013. 12. 31. 14:54
base_version="3.14.12.4" extn_version="20120904" extn_filename="extensionsTop_${extn_version}.tar.gz" extn_raw_dirname="extensions_for_${base_version}" tar xvzf ${extn_filename} --transform 's/extensions/'${extn_raw_dirname}'/'