I want to create a zip archive from all files which are in "my_folder". Here is how I do it:  zip -9 -y -r -q  name.zip /home/user/Stack_Exchange/my_folder/   The problem is that right now when I unpack the archive, the hierarchy of folders is fixed, so the result of unpacking is the home folder and inside is the user folder, etc.  How can I create a zip archive which has only "my_folder" in the directory? I mean I want to see the folder "my_folder" after unpacking the archive.
38031
I have a directory called folder that looks like this:  folder       -&gt; root_folder                     -&gt; some files   I want to zip this directory into zipped_dir, I tried:  zip -r zipped_dir.zip folder/*   But this generates a ZIP that looks like this:  zipped_dir           -&gt; folder                    -&gt; root_folder                                  -&gt; some files   in other words, it's including the directory whose contents I want to zip. How can I exclude this parent directory from the ZIP, without moving anything?  IE I would like this end result:  zipped_dir           -&gt; root_folder                         -&gt; some files
96612
I, need to zip a directory excluding some subdirectory  and file; I used this:   zip -r zipfile.zip . -x ".*" -x "app/bower_components" -x "node_modules" -x "*.zip" -x "node_modules"   without  any success; node_modules is a folder in the principal one while bower_components is inside the folder app
1616
I have 100s of directories and within those I have a few zip files. Now there are  images named abc.jpg in those zip files. The zip files may be in any folder or in any subfolder so its difficult to extract them all in one place.  I just want to collect those image files. Is this possible?
57357
How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.
37984
I am working on SunOS 5.10. I have a folder that contains about 200 zip files. Each zip file contains only one text file in it.  I would like to search for a specific string in all the text files in all the zip files.   I tried this (which searches for any text file in the zip file that contains the string "ORA-")  but it didn't work.   zipgrep ORA-1680 *.zip   What is the correct of doing it without uncompressing the zip files?
48507
I need to split a .zip file in Ubuntu as .z01, .z02 etc... so that I would join them back in Windows.  I don't have access to command prompt in Windows. How would I unzip files now?
95132
I'd like to know what is the command to use to gunzip all files in a target directory recursively? I tried to use the unzip command but it didn't work.  I tried the command from
25881
I want to see the contents (list of files and folders) of an archive, for example a  tar.gz file without extracting it.  Are there any methods for doing that?
101484
How can I create 7-Zip archives from my C# console application? I need to be able to extract the archives using the regular, widely available  program.    Here are my results with the examples provided as answers to this question   "Shelling out" to 7z.exe - this is the simplest and most effective approach, and I can confirm that it works nicely. As , I just need to guarantee that 7z.exe is installed on all target machines, which is something I can guarantee.  - this refers to compressing cookies "in-memory" before sending to the client; this method seems somewhat promising. The wrapper methods (wrapping the ) return type byte[]. When I write the byte[] array to a file, I can't extract it using 7-Zip (File.7z is not supported archive).  Wrapper (found on CodePlex) - this wraps the 7z exe/. I referenced the project from my app, and it successfully created some archive files, but I was unable to extract the files using the regular 7-Zip program (File.7z is not supported archive).  - I guess I'm not smart enough to figure out how to use this (which is why I posted here)... Any working code examples that demonstrate creating a 7zip archive that is able to be extracted by the regular 7zip program?  - only supports extracting from 7zip archives... I need to create them!  - According to their , SharpZipLib doesn't support 7zip.
18295
Could anyone tell me what is up with so many archives, and how are they differ?  There's at least five that I can think of, .tar.tz, .tar.gz, .tar.bz2, .tar.lz, .tar.z  Which is best for what applications? It just seems silly to make so many variations of the same file but I'm sure there's a reason.
35649
I am creating an ZIP file with ZipFile in Python 2.5, it works ok so far:  import zipfile, os  locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close()   but I couldn't find how to encrypt the files in the ZIP file. I could use system and call PKZIP -s, but I suppose there must be a more "Pythonic" way.  I'm looking for an open source solution.
48492
Want to Gzip my all the .csv files into a gzip file.  I am using this command.  gzip *.csv;   Problem File contains '//' in its name that's why command is giving error.  Error : - '//File.csv' is not a directory or file.  So please suggest me what ways i can do this successfully.  one solution i thought.  gzip '//File1.csv' '//File2.csv' '//File3.csv'   Please suggest me if this is the right way to perform the same.
44781
I have a folder that contains multiple files  folder  artifact1.app artifact2.ext2 artifact3.ext3 ...   My goal is to zip the file from outside this folder (so without using cd command) without including the folder dir. zip -r ./folder/artifact.zip ./folder/artifact1.app  This command includes the folder dir in the final zip. Any hints? Related question:
21785
Is there a way to encrypt a folder, which is not in Home (/home/user/) but even in a different partition, so only my user can access/read contained files?  Alternatively, I would like to understand if it is possible to turn a complete ext4 partition into an encrypted volume, which would be mounted at user login.  If possible, I would like to make the change without reinstalling Ubuntu.  My PC has (mount output):  /dev/sda1 on / type ext4 (rw,errors=remount-ro) /dev/sda3 on /home type ext4 (rw) /dev/sda4 on /home/igor/Personale type ext4 (rw)   sda4 is the partition containing folders I would like to protect.
74364
I have files ending in ~ in my home directory, and I want to delete them. How do I do that? How do I prevent this backup functionality?
103997
I'm in a folder: /var/myfolder.   Inside there are some other folders like: /var/myfolder/A/ /var/myfolder/B/ `/var/myfolder/C/ etc.   Inside each there are some files with random names. How do I remove all the files from all the folders inside /var/myfolder?   The structure (all the directories, eg., A, B, C etc., inside /var/myfolder) should remain intact.
101768
I am using Ubuntu 15.10 and I had a file name __app.zip and I was wanting to move that inside the folder name testing  To move the file i used the following command after which I cant find the file anymore, from searching online I understand now that i did not need to put / before the folder name.  sudo mv __apps.zip /testing   Is there anyway to get the lost file back?