Posts Tagged ‘tar’

Sonntag, 3. November 2013

(Aus dem Archiv) Extract single file from a tar.gz-Backup

Der vorliegende Artikel habe ich ursprünglich irgendwann einmal ab 2002 auf meinem damaligen Linux-Entwicklungsserver im Web publiziert. Da ich das bloggen erst 2005 entdeckt habe, waren die Tipps in einer grossen HTML-Seite untergebracht. Anlässlich einer Aufräumaktion auf dem Server habe ich mich entschieden, die „Perlen“ über meine heutige Kommunikationsplattform ins Web zu posaunen. Seitdem ich die Artikel verfasst habe, sind viele Tage ins Land gegangen — ob der Artikel noch Gültigkeit hat, entscheidet der geneigte Leser selber.

Recently, I accidentally deleted a vital file on my linux server. Thanks to my regular backups by mkcdrec I just needed to have a look for the backup CD. After googling a few minutes, I came out with the appropriate shell command to extract the desired file out of a gzipped tar-archive:

tar -xzv --file=/Volumes/CDrec-29.07.2005/sdb1._var.tar.gz ./www/partyguide/curl/config.txt

This command recreated the directory structure in the current working dir (make sure you’re not cd-ed into the CD mount point, otherwise it can’t write out).

Tags: , ,
Labels: Linux

Keine Kommentare | neuen Kommentar verfassen