mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
Added various Linux compression commands.
This commit is contained in:
parent
47211cb729
commit
a0ac867b7b
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:e883affbe4f831de766b4bd337b2a666c4fe8d4118dcbc66de26378b67472b39"
|
||||
"signature": "sha256:4515e5f88373961da62945f02e97b93ca0c73478b952696d14d5cd396af307f1"
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
|
@ -222,17 +222,35 @@
|
|||
"## Compression"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Uncompress all tar.gz in current directory to another directory"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# Compress zip\n",
|
||||
"zip -r archive_name.zip folder_to_compress\n",
|
||||
"\n",
|
||||
"# Compress zip without invisible Mac resources\n",
|
||||
"zip -r -X archive_name.zip folder_to_compress\n",
|
||||
"\n",
|
||||
"# Extract zip\n",
|
||||
"unzip archive_name.zip\n",
|
||||
"\n",
|
||||
"# Compress TAR.GZ\n",
|
||||
"tar -zcvf archive_name.tar.gz folder_to_compress\n",
|
||||
"\n",
|
||||
"# Extract TAR.GZ\n",
|
||||
"tar -zxvf archive_name.tar.gz\n",
|
||||
"\n",
|
||||
"# Compress TAR.BZ2\n",
|
||||
"tar -jcvf archive_name.tar.bz2 folder_to_compress\n",
|
||||
"\n",
|
||||
"# Extract TAR.BZ2\n",
|
||||
"tar -jxvf archive_name.tar.bz2\n",
|
||||
"\n",
|
||||
"# Extract GZ\n",
|
||||
"gunzip archivename.gz\n",
|
||||
"\n",
|
||||
"# Uncompress all tar.gz in current directory to another directory\n",
|
||||
"for i in *.tar.gz; do echo working on $i; tar xvzf $i -C directory/ ; done"
|
||||
],
|
||||
"language": "python",
|
||||
|
|
Loading…
Reference in New Issue
Block a user