I have several files as follow :   multiview_action.tgz.part-aa   multiview_action.tgz.part-ab ... ... multiview_action.tgz.part-ap     I tried the following command :   tar -zxvf multiview_action.tgz*   I got the following error :  gzip: stdin: unexpected end of file tar: Fin prématurée rencontrée dans l'archive. tar: Error is not recoverable: exiting now
36403
I am receiving this error message when I'm trying to uncompress a .tgz archive:  $ tar -zxvf OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.1 gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now   As you can see, the file name ends with .tgz.1.  When the file name is .tgz.0 it will be uncompressed with no error by the tar -zxvf command.
2126
A client uploads files to a development server. When it's time to upload the project to a production server, those files are no longer needed, and we'd like to exclude them from the tar file we'll eventually push to production. However, we still want to keep the directory in tact, it's only the files that are not needed  Using Ubuntu 16 and tar 1.28, we've tried:  tar -vczf archive.tar.gz . --exclude=wp-content/uploads/wpallimport/files/* tar: Cowardly refusing to create an empty archive   We've also tried enclosing exclude= parameter in single and double quotations, no luck.   tar -vczf archive.tar.gz . --exclude='wp-content/uploads/wpallimport/files/*' tar: Cowardly refusing to create an empty archive   The  shows --exclude without equals sign  tar -vczf file.tar.gz --exclude 'directory/*' . and gives the same error.  How is this done?
86543
More and more  archives use the  format based on LZMA2 for compression instead of the traditional  compression. In fact kernel.org made a late "Good-bye bzip2" , indicating kernel sources would from this point on be released in both tar.gz and tar.xz format - and on the main page of the  what's directly offered is in tar.xz.  Are there any specific reasons explaining why this is happening and what is the relevance of  in this context?
117872
Before using tar to extract a .tar.gz archive, it is possible to get an estimate of how large the extracted files are in total?
100214
How do I convert all files in a folder to a different line ending (linux or mac)? I am using Windows.  Right now my approach is to use Winscp to copy to a linux box and then run dos2unix recursively on the folder.
21687
I have these lines in the fstab   # binds /media/DataNtfs/Music           /home/can/Music                  none    rw,bind  /media/DataNtfs/Pictures        /home/can/Pictures               none    rw,bind  /media/DataNtfs/Downloads       /home/can/Downloads              none    rw,bind  /media/DataNtfs/Documents       /home/can/Documents              none    rw,bind  /media/DataNtfs/Backups         /home/can/Backups                none    rw,bind  /media/DataNtfs/Notes           /home/can/Notes                  none    rw,bind  /media/DataNtfs/Other           /home/can/Other                  none    rw,bind  /media/DataNtfs/Packages        /home/can/Packages               none    rw,bind  /media/DataNtfs/Photos          /home/can/Photos                 none    rw,bind  /media/DataNtfs/Videos          /home/can/Videos                 none    rw,bind  /media/DataNtfs/WorkSpace       /home/can/WorkSpace              none    rw,bind
114873
The root filesystem ran out of space, so I'm deleting all the extraneous junk. I already deleted everything in /var/log and /var/cache/apt/archives and did sudo apt autoremove.  This /var/tmp is using 18.5 GiB. What is it used for? Is it safe to delete the contents?  UPDATE  I found these 2 swap files:  474M    10112015.tgz.swp 19G     10022015.tgz.swp   Those swap files were generated by opening tar files in vi.   Is there a way to limit the amount of storage space used by /var/tmp?
12566
At the moment, if I download a compressed file, it could be any of a .tar.gz archive, a tar.bz2 arhive, a .zip archive or a .gz archive. And each time I do so, I have to remember what the command line options for that program are.  Is there any CLI program where I can just go:  undocompression somefile.??  and let it figure out what format the archive is in? (overly long name used to avoid conflicting with any real program)
32072
I am searching for a nice method of merging two or more files line by line using the zipper method (also called late merge). Assuming we have three files, the result should look like this:  line1 file1 line1 file2 line1 file3 line2 file1 line2 file2 line2 file3 ...   EDIT  I wrote a little python script capable of doing this:  #!/usr/bin/python  import sys, itertools  fileList = [] for file in sys.argv[1:]:     f = open(file, "r")     fileList.append(f.read().split("\n"))  for z in itertools.izip_longest(*fileList):     print "\n".join([i for i in z if i is not None])   I still wonder if there is any standard tool or a clever combination of them doing the same thing.
5571
When handling log files, some end up as gzipped files thanks to logrotate and others not. So when you try something like this:  $ zcat *   you end up with a command line like zcat xyz.log xyz.log.1 xyz.log.2.gz xyz.log.3.gz and then with:  gzip: xyz.log: not in gzip format   Is there a tool that will take the magic bytes, similar to how file works, and use zcat or cat depending on the outcome so that I can pipe the output to grep for example?  NB: I know I can script it, but I am asking whether there is a tool out there already.
92122
I can probably write a shell script to find files only, then pass the list to tar, but I am wondering whether there already is a built-in feature in tar that allows doing just that, in a single command line?  For example, I found the --no-recursion switch, but when I do:  tar --no-recursion -cvf mydir.tar mydir   It only archives the names of the entries in the directory (including subdirectories!), but it doesn't archive any files.  I also tried:   tar --no-recursion -cvf mydir.tar mydir/*   But while it archives files only, it also archives the names of the subdirectories.  Is there a way to tell tar files only, no directories?
83149
If I have a file which name starting with single or several minus sign, for example --1 it can't be used as a parameter of many commands. Even if I run  cat --1   instead of file content I get unrecognised option error message:  cat: unrecognized option '--1'   Same effect appears when I type  cat "--1" cat '--1' cat \-\-1   nothing works. Files starting with '-' is not illegal in file system, but it is quite hard to work with them in cli and scripts. OK, in case of cat or grep I can use  cat &lt;--1   and this will work, but  rm --1   won't work either and it is quite hard to substitute this command with something else. Very uncomfortable after all. Is there any universal workaround different from not using such file names?   BTW, if name file is single - and all most of commands will understand it as stdin, wouldn't they?   And it would be hard not to use such file names since I can't rename them all in script using mv command either.
9573
I have a text file abc.txt and its contents are:     /lag/cnn/org/one.txt    /lag/cnn/org/two.txt    /lag/cnn/org/three.txt   If I use:  $ tar -cvf allfiles.tar -T abc.txt   I'm getting the tar of files in the list. Similarly is it possible to copy those files in abc.txt to a folder?  I tried this:              $ cp --files-from test1.txt ./Folder   But it is not working.
36778
I'm wanting to create a tar archive of a specific directory (with its subdirectories of course). But when I do it, using the tar command, I get a list of files that were included, for example:     a calendar_final/._style.css      a calendar_final/style.css   As you can see, there are two versions of the same file. This goes for every file, and there are many. How do I exclude the temporary files, with the ._ prefix, from the tar archive?
96553
I would like to compress a text file using gzip command line tool while keeping the original file. By default running the following command  gzip file.txt   results in modifying this file and renaming it file.txt.gz. instead of this behavior I would like to have this new compressed file in addition to the existing one file.txt. For now I am using the following command to do that  gzip -c file.txt &gt; file.txt.gz   It works but I am wondering why there is no easier solution to do such a common task ? Maybe I missed the option doing that ?
8415
I tried tailing two files using the option:  tail -0f file1.log -0f file2.log   In Linux I see an error "tail : can process only one file at a time".  In AIX I see the error as "Invalid options".  This works fine when I use:  tail -f file1 -f file 2   in Linux but not in AIX.  I want to be able to tail multiple files using -0f or -f in AIX/Linux  multitail is not recognized in either of these OS.
91920
When I type   unzip &lt;tab&gt;   I get a list of all files ending in .zip, which is the standard behavior of tab completion for the unzip command.   However, I also want bash completion for unzip list files which end in .udp, in addition to .zip files. How can I achieve this behavior in my local .bashrc?