Changes
Jump to navigation
Jump to search
← Older edit
Linux command: tar
(view source)
Revision as of 07:57, 26 April 2019
492 bytes added
,
07:57, 26 April 2019
m
→With password
Line 17:
Line 17:
tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
tar --exclude='./backup' -zcvf - . | split --bytes=1024MB - backup/content.sdf.backup.tar.gz.
tar --exclude='./backup' -zcvf - . | split --bytes=1024MB - backup/content.sdf.backup.tar.gz.
+
</syntaxhighlight>
+
+
===With password===
+
<syntaxhighlight lang="bash">
+
tar -czf - * | openssl enc -e -aes256 -pbkdf2 -out secured.tar.gz
</syntaxhighlight>
</syntaxhighlight>
Line 29:
Line 34:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
tar -zxvf archive.tar.gz
tar -zxvf archive.tar.gz
+
</syntaxhighlight>
+
+
====With password====
+
<syntaxhighlight lang="bash">
+
openssl enc -d -aes256 -pbkdf2 -in secured.tar.gz | tar xz -C target_dir
</syntaxhighlight>
</syntaxhighlight>
Line 44:
Line 54:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
tar -jtvf file.tar.bz2
tar -jtvf file.tar.bz2
+
</syntaxhighlight>
+
+
===Extract all files in subdirectories===
+
<syntaxhighlight lang="bash">
+
DEST=<Destination Folder>
+
SRC=<Src Folder>
+
find $SRC -name "*.tar.gz" -or -name "*.tgz" -exec tar xzvvf -C $DEST {} \;
</syntaxhighlight>Note: .gz files are decompressed with <nowiki>gunzip file.gz</nowiki>
</syntaxhighlight>Note: .gz files are decompressed with <nowiki>gunzip file.gz</nowiki>
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version