Fedora :: "less" Command Lists Contents Of (compressed) Archive Files?

Jun 13, 2010

I came across this feature of the "less" command today. It appears not to be well-documented so I'll share it here. I found that "less" can automatically uncompress compressed files - no need to run the first command, the second does the same job:

Code:

gunzip -c textfile.gz | less
less textfile.gz

Even better, "less" can read and list the contents of some archive files as well, including Tar files compressed using Gzip and Bzip2 as well as Zip files. So now when I want to list the contents of an archive,for example to determine whether the contents will be extracted to an absolute path or relative to the working directory, the following work

Code:

less archive.tar.gz
less archive.tgz
less archive.tar.bz2
less archive.zip

Much easier than remembering the various options that the Tar, Gzip, Bzip2 and Zip use. The best one for me is with RPM archives:

Code:

less some.rpm

The above outputs the Information, Change Log and verbose File List of the RPM (paging the output, of course!) The following commands (using short and long options) give the equivalent output using the "rpm" command:

Code:

rpm -qilvp --changelog some.rpm | less
rpm --query --info --list --verbose --package --changelog some.rpm | less

"less" does not recognise the initramfs file produced by "dracut" (which is a compressed "cpio" archive), but I suppose you can't have everything ...

View 2 Replies


ADVERTISEMENT

Ubuntu :: Gnome Commander Does Not Add Files When Creating A New Archive/compressed File?

Feb 19, 2010

When trying to create a new compressed/archive file in Gnome Commander (GM) the file is created but the selected files are not added. I can open the new (empty) archive file and then add files to be compressed. I have tried using several different formats (zip, tar.bz and others) with the same results. The "file roller" is shown as a plugin but has no configuration other than the compressed file type.

View 2 Replies View Related

Fedora Installation :: Unable To Extact .rar Files - Error - There Is No Command Installed For RAR Archive Files

Jul 20, 2010

i am downloaded some e-books in the format .rar. when i am extracting them i am getting error as There is no command installed for RAR archive files. Do you want to search for a command to open this file?

View 3 Replies View Related

Fedora :: Unable To Handle Compressed SWF Files?

Oct 19, 2009

I'm wondering if there is any application being able to handle compressed SWF files. If I try it with mencoder (mplayer), it tells me:[swf @ 0x91a0a30]Compressed SWF format not supported No way in Fedora Core 11?

View 3 Replies View Related

Ubuntu :: File Extension Z - Unix Compressed Archive File?

May 6, 2010

Anyone know how to compress a file to extension z?not tar.gz , zip, 7zip

View 6 Replies View Related

General :: Copy The Contents Of A Txt File To Other Txt Files (with Similar Names) By Cp Command?

Jul 2, 2010

Code:
cp -r aa123.h aa*.h
results in
Code:
cp: target `aa456.h' is not a directory

Yes I read man page cp (1p). There is something written there about it, I couldn't understand though.

View 7 Replies View Related

Fedora :: Extract Specific Files From A .tar Archive?

Jul 20, 2011

I have a .tar archive of music that I would like to extract specific files / folders from. I've been looking at man tar but I don't seem to be able to find any information related to my quest, although someone will likely point out that it's right there in front of my nose

Anyhow, the file is called music_archive.tar and I would like to extract the folder /music/P/Pink Floyd/The Wall/. Anyone know how to do this

View 2 Replies View Related

General :: Looking For Non Compressed Small Command Line System Distro?

Oct 31, 2010

We are having a lot of trouble with this.

We need a command line version of Linux like ttylinux. Any command line will do with the latest kernel. It should be around 50 megs.

But the problem is, all these small Linux versions are LiveCD or have a compressed file system.

We need a SMALL linux distro, that we can install UNCOMPRESSED (no squashfs etc) on a hard disk.

This is so simple I'm sure I'm missing something..

View 3 Replies View Related

Ubuntu :: How To Extract Split Compressed Files

Jun 24, 2010

im trying to reconstruct / extract a file that was too large to fit onto a floppy, used 7zip to create and split the file into multiple parts in tar.bzip format. this was done in windows. Then moved all the parts of the file to tiny linux on a really old laptop. no cd drive, no usb or network. so have to rely on floppy drive. i do know that reconstruction while extracting using commands is possible. but not working.tried tar -xMf file.tar.001 but nothing.

View 2 Replies View Related

Ubuntu :: Generate Compressed Files In Zip Format ?

Oct 30, 2010

I was trying to figure out how to generate compressed files in zip format and searched on here. The search produced a list of forum entries on the topic, but all of the instructions were on how to do it in terminal, how to download obscure programs and install them from terminal, then run them from terminal, with all these arcane sets of switches and parameters. Eesh.

It comes with Ubuntu, after all. In the case of zipping files, all you have to do is to go to the File Manager, find the file(s), select it or them, right-click on it or them, and select Compress and file type zip. It's so simple.

There have been a number of other tasks where I wind up spending hours figuring out how to implement the advice offered in these forums through Terminal. The folks who offer the advice often are so good at it that they leave out steps obvious to them, but that take a lot of work for somebody not as skilled at it to find out. After crawling through broken glass to get the job done, and normally screwing something up so it's not quite right once I get it going, I figure out how to do it through the GUI and find out it takes a fraction of the effort.

View 9 Replies View Related

Slackware :: Error: Cannot Find Compressed IMG Files?

Nov 7, 2010

I'm trying to get M-Dist v0.1 to work but I'm having problems booting up the iso. This version is based on Slackware 9.1.From what I can see before the error is this output:

RAMDISK: Compressed image found at block 0
Freeing initrd memory: 3107k freed
EXT2-fs warning: checktime reached, running e2fsck is recommended

[code]....

View 1 Replies View Related

Ubuntu Servers :: Command That Lists All Ip Address?

Jan 18, 2011

I have a bunch of windows machines connected to a server running samba. I would like to know if there's a way or hopefully a quick command I could type in the terminal that would tell me the machine name and the associated IP address?

View 3 Replies View Related

Ubuntu :: Lists Files With Both File Size And MD5 Hash?

Jan 20, 2010

Is there any utility that can provide a list of all files, and both the file size and md5 hash value. Preferably also including other hash values.I've got 1.5 TB of files to go through, and delete duplicates..Neither fdupes or fslint are up to the task --- both claim files to be duplicates, when they definately are not. (Movies, and OOo documents are not identical, even if one is the script for the other, which in this case is not the case. Both fdupes and fslint claimed that those two files were identical. (And yes, I did look at them.

View 5 Replies View Related

Ubuntu :: Dpkg Lists Files For Kernels Not Installed (Lucid) / Fix It?

May 26, 2010

Today I was trying to clean up my system and am a little bit stumped on something.

I used synaptic to clean up installed kernels, except for the one that was currently running. Once done I went ahead and restarted my computer.

Grub lists only one kernel available. However when I go to a prompt and

issue dpkg --list|grep linux-image I get several items listed code...

2.6.32-22-generic is the kernel I am running so I assume the "ii" files have something to do with the kernel in memory.

However, what are the "rc" files that are listed? Resource files? All three kernels referenced have been removed a LONG time ago and when I look for installed headers, or anything else, there is nothing installed for *-12, *-12 or *-14.

And when I check Synaptic for just the kernel number I get a list of packages with no version install, no latest version notation and no description (attached screenshot).

Just what are those references and how does one remove them?

View 2 Replies View Related

General :: Tar Command - Making Archive From Current Directory?

Mar 31, 2011

I have been playing around with the tar command and I know this is how to use it.
Code:
tar -cf [filename] [directory]
But what I want to make an archive from the current directory I thought just to not enter a directory but that doesn't work. I get an error about creating a empty archive so how to do I make it so how do I tell it to do the current directory?

View 5 Replies View Related

General :: Ubuntu 10.04 - Tar Command To Archive Home Directory

Sep 3, 2010

Ubuntu 10.04. As part of my nightly backup script I archive my home directory with the following command
tar -cvpzf /quitelarge/_mirror/mirror1/home-ken.gz /home/ken 2>> /quitelarge/_mirror/tar-error.log

It seems to work fine and I have recovered files from the archive on occasion. Actually I keep 7 rolling daily backups and a monthly burn to DVD. I had an sftp connection made by Nautilus to my server. Ubuntu for whatever reason places an icon on the desktop showing the connection. When I ran the script it decided to archive everything on my server - all 1.4 TB. I caught the problem when home-ken.gz was about 5 GB. I stopped the process, closed the sftp connection, rolled back the backups and tried again. This time I got a file of the expected size - about 45 MB.

In the error log I did find that the tar process was trying to suck the entire contents of the server into the archive file.
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c/sub0: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/scsi: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/event: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/fadt: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/dsdt: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/irq/21/smp_affinity: Cannot open: Permission denied

Is there an option I can place on the tar command to tell it NOT to follow the ssh connection which is sitting on my desktop? The closest thing I see in the documentation is -h which tells tar to "follow symlinks; archive and dump the files they point to." I am NOT specifying -h so if the ssh connection is treated as a symlink by tar I would still not expect the remote contents to be tarred.

View 13 Replies View Related

Ubuntu :: How To Set Up The Files Instead The Archive

Jan 31, 2011

[url] I really love that conky config. But I can't figure out how to set up the files instead the archive.

View 1 Replies View Related

Ubuntu :: Zip File Gvfsd-archive / Archive Mounter Read Write Mode

Dec 6, 2010

I'd like to ask about archive mounter feature, can I mount zip file with read write mode? can gvfsd-archive do that?, or I must use fuse-zip to mount it? If I must use fuse-zip, how I wrap it so I can use it via nautilus or via gvfs-fuse-daemon

View 4 Replies View Related

OpenSUSE :: Exclude Files From A ZIP Archive?

Mar 21, 2010

opensuse v11.2, linux 2.6.31.12-0.1-desktop x86_64
ZIP v2.32

I wish to exclude some files from a zip archive. On other OSes to exclude an entire directory I would use the "-x" option like so:

Code:
zip -r archive-name * -x dir1/* Simple. And just add "-x"'s as needed (or use an exclusion file).

Not how it works here, it would seem. AFAICT all "-x" options are ignored. (The entries in an exclusion file also.) For instance, "-x diy/mplayer/*" should ignore everything in the <diy/mplayer> directory. It does not. I have tried fully qualified paths as well; no joy.

What is different about ZIP on linux?

View 7 Replies View Related

Ubuntu :: How To Archive My Music Files

Feb 28, 2010

I have a ton of music that I would like to upload to an on-line storage site. Ideally, I would like to keep the file organization structure intact, but am limited to 50mb file size.

Is there a way to compress this whole directory without going through and compressing every folder individually, while maintaining less than a 50mb file size?

View 2 Replies View Related

Ubuntu :: Zip And Jar Files Both Detected As Zip Archive?

Jun 22, 2011

As you may know JAR file are zip archive, therefor I can't set my Ubuntu to open (by defualt) JAR file with Java and ZIP files with Archive Manger.

View 6 Replies View Related

Ubuntu :: Recursively Deleting Files From Within Archive

Feb 2, 2010

I've got a directory of geographic data with ~2,000 archives. Each archive (e.g. foo.zip) has two files, the second of which I'd like to remove:

Now, I can remove the _num.tif file with the command:

How do I do this with ALL the files in the directory? If I try the -r (recursive) option, that fails with -d.

View 4 Replies View Related

Red Hat / Fedora :: Backup Program - Cannot Be Zipped Or Compressed

Apr 16, 2010

What i am trying to acheive with my minimal knowledge is to set up a linux system that will backup windows based computers to a couple of terabyte hard drives installed in this system. The backups cannot be zipped or compressed in anyway as the backups have to be able to be di-sected and only parts of them restored to their respective computers. Backing up over a network would be a great bonus but not necessary. Does anyone know a program that would fulfil my needs whilst still being simple so i can install and configure it?

View 2 Replies View Related

General :: Shell Command To Display Contents Of A File?

Feb 23, 2010

shell command to display contents of a file? Like that of .txt or .html

View 9 Replies View Related

General :: Show Size Of Folder Contents In Ls Or Some Other Command

Sep 29, 2010

I know these folders each have >80gb of files. Yet, they only show 4.0K in ls -lah? How can I have ls show size including the contents?

[root@aapsan01 aapxen01]# ls -lah
total 48K
drwxrwxrwx 6 root root 4.0K Sep 29 03:45 .
drwxrwxrwx 15 root root 4.0K Sep 27 09:15 ..

[Code]....

View 4 Replies View Related

Debian Installation :: Replace Only The Change Files From The Archive?

Aug 21, 2010

If I understand everything right I can use simple cd to create an install of my system then config everything and create an archive of /etc,/var,/usr and that give me a backup of my changed files. but what I am not able to do is create a script to replace the files with the archived version of the config files automatically. I need it to be ran as a post intall script or to configure the conf files as part of the install. what I configure on every reinstall. apache,proftpd,mysql,php,and wordpress. Since I am still learning I reinstall a lot and standard backups have not been working for me. But I can put the whole install including backup on one cd. Is there a way replace only the change files from the archive. or getting a list of just the modafied files on my system.

View 1 Replies View Related

Ubuntu :: RAR Archive - Extracted Files Not In Destination Folder

Sep 14, 2010

I have a RAR archive, split into 40 sections, containing a folder with a total of 2GB of data. When I Open the Archive using "File Roller 2.30.1.1" and drag the archived folder to destination folder, it says that its uncompressing, but after its uncompressed, there is nothing there, in the destination folder. Where was the 2GB extracted stuff gone?

View 1 Replies View Related

Ubuntu :: Archive Manager Unable To Open Pdf Files

Nov 7, 2010

surprisingly come across this file that the ubuntu archive manager is simply unable to unpack.these are some articles that i am trying to download.strangely i have never heard of the format and the page asks me to download "stuffit expander" to allow me to view the pdf files.
however when i download the file saving it on the desktop, and try to open it, archive manager is simply unable to do so!this is the title of the downloaded file -

VOL13_NO3_4.sit
and its 1.3 MB

and i am as of now unable to open it in any way.

View 9 Replies View Related

General :: Archive All Files To One Single File In Every 30 Days?

Apr 12, 2010

I have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .

archive all files to one single file in every 30 days , and then remove these old files .

View 9 Replies View Related

Red Hat / Fedora :: Invalid Compressed Data - Length Error

Jun 20, 2011

I have a something.gz file. When I type gunzip -c something.gz this commend open the file but at the end of the file I get an error message invalid compressed data--length error. Also if I type more at the and of this commend like gunzip -c something.gz | more, file would not open. It gives some meaningless characters.I want to open this file with more.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved