Tuesday, January 15, 2013

AVFS howto/guide/tutorial.

This's a virtual FS to browse through archives. It can even browse through block devices (like cd/dvd drives, PD etc...) if you've written whole archives on them directly. It also supports network protocols like ftp, http etc..

Things work around avfsd with no root privileges required, just ensure you're in the fuse group (i.e. if that group exists in your OS).

Avfs is going to mount the root dir to a place where you point to –

avfsd archive

Will mount the root (or root like) FS to directory archive.

In archive/ browse to the archive location (or 'cd' to it), and then open it by placing a # after it's name, e.g. –

cd archive/home/user/backup_drive/backup.tar.xz#

This's going to cd into the archive.

If you use just #, avfs will rely on the extension of the archive to detect the type of archive, thus the # is actually a shorthand. The full path to open the archive also includes the type of archive, it's specified by placing certain text (depending on the archive type) after the # –

cd archive/home/user/backup_drive/backup.tar.xz#uz

Where uz means a xz archive and uses gzip for it's decompression. But cause it's tar.xz, you'll see a tar archive inside it, to also browse into the tar archive –

cd archive/home/user/backup_drive/backup.tar.xz#uz#utar

You have to use these with block devices if you burnt the archive to them directly –

cd archive/dev/sr0#utar

i.e. the tar archive has been burnt directly to the optical media.

This's going to make avfs assume the file is first compressed with uz, then utar. Similarly –

cd /home/user/backup_drive/backup#urar#utar

Supported archives and such keywords (as of the current time) –

#deb debian packages

#ftplist ?

#hp48 ?

#lslR directory tree listings

#mailfs ?

#patchfs browse patch files

#rpm rpm packages

#rpms List of installed rpms

#trpm Useful inside #rpms

#ucpio cpio archives

#ulha lha archives

#uzoo zoo archives

#a first floppy drive alias for #floppy:a

#avfsstat meta information builtin

#bz2 bzip2 uses bzip2

#dav webdav builtin

#dav_ctl control dav sessions

#floppy floppy uses mtools (mdir, mcopy, ...)

#ftp ftp builtin

#ftp_ctl control ftp sessions

#gz gzip uses gzip

#iso9660 CD/DVD filesystem no need to use mount -t iso9660!

#local local filesysem only for internal use

#rsh rsh/rcp only works if rsh needs no password

#ssh ssh/scp only works if ssh needs no password

#uar un-ar builtin

#ubz2 bunzip2 builtin

#ubzip2 bunzip2 uses bzip2

#ucftp ftp builtin (write support, no file cache)

#ucftp_ctl control ftp sessions

#ugz gunzip builtin (1)

#ugzip gunzip uses gzip

#urar unrar builtin list + uses rar to extract

#utar untar builtin

#uxz unxz/unlzma builtin

#uxze unxz/unlzma uses xz

#uz uncompress uses gzip

#uzip unzip builtin

#volatile 'memory fs' mainly for testing

#u7z p7zip 7z archives

These are built in type (or there by default).

Avfsd relies on programs (e.g. 7z, tar, xz, gzip, unrar etc...) and scripts to open up archives; the script tells avfsd how to operate the command (arguments etc...) to open up the archives.

This means you can extend the supported the archive type; the script in question is placed at /usr/lib64/avfs/extfs on Gentoo. May differ for other distros.

You can get a lot of such scripts on the net; but as know know, you're at risk 'downloading' them directly, it may be malware.

Depending on the archive type, programs's efficient etc... it may take a long time for a programs to read the file, or seek to the file (this's an issue in case of lzma1/2 compression); or it may take less time, it depends on the archive format.

To open ftp –

By cding to the mount mount of avfs FS.


No comments:

Post a Comment