Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.333.929 Times

cmdfs for Linux 0.3

Company: Mike Swain
Date Added: September 21, 2013  |  Visits: 313

cmdfs for Linux

Report Broken Link
Printer Friendly Version

Product Homepage
Download (16 downloads)

cmdfs is a FUSE-based virtual filesystem which applies an arbitary filter command to selected files in a source directory tree to create the destination files. Includes configurable caching and monitoring of the source tree to limit CPU use and prefetch data.<br /><br />Build<br /><br /> 1. Unpack archive<br /><br /> tar zxvf cmdfs-0.1<br /><br /> 2. Configure build<br /><br /> cd cmdfs-0.1<br /> ./configure<br /><br /> 3. Build<br /><br /> make<br /><br /> 4. Install<br /><br /> sudo make install<br /><br />Synposis<br /><br />cmdfs < source-dir > < mount-dir > [options]<br /><br />options<br /> -o extension=ext1[;ext2[;...]]<br /> Specify matching file extension(s) to apply command to<br /> <br /> -o path-re=< regular expression ><br /> Specify regexp of pathnames to apply command to<br /><br /> -o mime-re=< regular expression ><br /> Specify regexp of mime types to apply command to (as returned by file -b --mime-type)<br /><br /> -o link-thru<br /> Pass unmatched files through to filesystem as symbolic links [default: files not listed or accessible]<br /> <br /> -o monitor<br /> Watch source directory tree for new files and cache them as they appear. New directories will be monitored [default: not monitored]<br /> <br /> -o cache-dir=< dir ><br /> Directory to save cache files [default: /tmp/cmdfs-cache.< USER >]<br /> <br /> -o cache-size=< size in Mb ><br /> Size to attempt to limit cache directory to. Files removed on least-recent access basis.[default: no limit]<br /> <br /> -o cache-entries=< count ><br /> Number of entries to attempt to limit cache directory to. Files removed on least-recent access basis.[default: no limit]<br /><br />How It Works - An Example<br /><br />Given a source tree, which includes, say, jpg images, we can generate a view filesystem which contains the same files resized to email size.<br /><br />The filter command is set up as a fileystem option at mount time. In this case our filter option might be something like (using ImageMagick's convert command):<br /><br />command=convert - -resize 20% -<br /><br />Note we follow the UNIX convention of taking the standard input and filtering to standard output. Being a FUSE filesystem, the child process will be run under the group/user of the owner. The command is run within a shell (/bin/sh) process, as if started by /bin/sh -c ''<br /><br />Obviously there'll be files in the source tree which we dont want to apply the filter to. In this case we identify files of interest by extension:<br /><br />extension=jpg;gif;png<br /><br />To mount the filesystem as above for a particular user:<br /><br /> cmdfs /home/bob/images /mnt/myphotos "-ocommand=convert - -resize 20% -,extension=jpg;gif;png"<br /><br />Selection Filters<br /><br />As well as just matching on extension, files of interest can be selected by mime type, matching a regexp (cmdfs uses the file command to determine the mimetype):<br /><br />mime-re=image/*<br /><br />Or just a plain path regexp (this allows us to exclude whole directory subtrees etc<br /><br />path-re=.*/my-images/<br /><br />These options can be combined to get the required filter selection.<br /><br />Unmatched Files<br /><br />By default, files which don't match a filter won't appear in the filesystem view. We may want to see the original files though, so the<br /><br />link-thru<br /><br />option may be specified. This will generate symbolic links to the original files.<br /><br />Monitoring<br /><br />The image resize example is a good example of an application where we might want the files in the source filesystem to be filtered as they are added, rather than just on-demand. Cmdfs uses inotify to monitor all the directories in the tree, and automatically monitors new subdirectories as they are added:<br /><br />monitor<br /><br />When you copy the latest batch of files from your camera the resized versions will automatically be generated.<br /><br />Caching<br /><br />cmdfs only recreates view files if the modification date changes on the source. All files created using the filter are held in a cache directory, with a name created as a hash from the full path. By default this directory is located in /tmp/cmdfs-cache.< user name >, but can be changed:<br /><br />cache-dir=< dir ><br /><br />Note that some systems will clear the /tmp directory tree between reboots, which may or may not be desired.<br /><br />The size of the cache directory can be limited using:<br /><br />cache-size=< size in mb ><br /><br />and/or<br /><br />cache-entries=< number of files ><br /><br />The least recently accessed cached files will be removed in the background to maintain these limits.<br /><br />Mounting With fstab<br /><br />To aid in mounting directories for multiple users, cmdfs accepts the source base directory as the first argument so it can be mounted using the conventional mount.fuse script from fstab. This allows supplying cmdfs# as the fs_spec (see man 5 fstab). The user_allow_other option needs to be enabled in /etc/fuse.conf to allow normal users to mount (see fuse.conf). An example fstab entry:<br /><br />cmdfs#/media/myphotos /home/bob/images fuse user,allow_other,command=convert??N*?*40-??N*?*40-resize??N*?*4020%??N*?*40-,monitor,cache-size=500,extension=jpg;gif;png 0 0<br /><br />Note that the spaces in the command need to be escaped using ??N*?*40 for /etc/fstab to parse correctly.

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Apply Cache Cmdfs Command Default Directories Directory Files Filesystem Filter Limit Mount Option Regexp Resize Source
Users rating: 0/10

License: Freeware Size: 122.88 KB
File Utilities  -  wyoFiler 0.7.2
wyoFiler shows all directories and files of a base directory in one tree window. Directories and files can be selected and manipulated across the whole hierarchy, from the base directory all the way down to the lowest level. Selected items may...
1.7 MB  
Database Tools  -  Web Server Backup 1.0
This package can be used to generate backup copies of Web server directory files and MySQL databases. It uses a separate class to generate a backup archive in ZIP format of a given directory.Another class is used to take a backup of a given MySQL...
10 KB  
Security Tools  -  Directory Password Security 1.1
Directory Password Security is a handy utility designed to apply passwords on directories or files. Once the directory or file is locked, it can not be accessed until correct password is put. This application can be used to protect the sensitive...
File Management  -  Copying and Pasting Directories and Files 1.0
This script presents a few basic fuctions that allow someone to copy a directory (along with its files and sub-directories) and paste it somewhere else. They ignore links and anything else that is not a directory or a file. The data returned from...
File Utilities  -  WinDos 1.3
Open DOS Command Prompt and Explorer window from a pick-and-point directory. Remembers up to 19 commonly used paths. Includes a Command Line Prompt allowing DOS, internal and Windows commands to be typed and run quickly from Windows. WinDos...
2.54 MB  
Utilities  -  Archive sort 0.1
Archive sort is a bash script that sorts directories into manageable 4.4GB directories for the purpose of archiving onto DVDs. It is useful if you have several tens or hundreds of GBs of data to archive. It can also be configured to sort into...
6.14 KB  
Backup Utilities  -  KBackup 0.5.2
KBackup is a program that lets you back up any directories or files, whereby it uses an easy to use directory tree to select the things to back up. The program was designed to be very simple in its use so that it can be used by non-computer...
276.48 KB  
Modules  -  jsmallfib 1.1c
jsmallfib, a native 1.5 Joomla! plugin extension, allows a normal Joomla! article to include a simple but effective file browser/manager. Depending on access levels, users can read or upload files, create folder trees, etc. The main repository can...
194.56 KB  
Network & Internet  -  htmltable 0.1
htmltable is a configurable way to generate HTML tables from, for example, command output, ASCII text files, etc. The project requires that all input lines have equal numbers of fields. The first line of input is assumed to be a header line....
3.07 KB  
Development Editors  -  AdMod 1.17.0
Command line Active Directory modification tool. This is the natural extension to AdFind. I was primarily prompted by dsmod,dsmove,dsrm.exe not being what I wanted them to be when I wanted them to be.
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Utilities  -  LPAR2RRD 4.95-4
LPAR2RRD collects performance data and generates actual, historical and future trends utilization graphs of your virtual environment. It is agentless (it receives everything from the management stations like vCenter or HMC). The product supports...
2.25 MB  
Utilities  -  Nessconnect 1.0.2
Nessconnect is a GUI, CLI and API client for Nessus and Nessus compatible servers. With an improved user interface, it provides local session management, scan templates, report generation through XSLT, charts and graphs, and vulnerability trending.
819.2 KB  
Utilities  -  Dynamic Power Management 2.6.16
The Dynamic Power Management (DPM) project explores technologies to improve power conservation capabilities of platforms based on open source software. Of particular interest are techniques applicable to running systems, adjusting power parameters...
30.72 KB  
Utilities  -  Ethernet bridge tables
Ethernet bridge tables - Linux Ethernet filter for the Linux bridge. The 2.4-ebtables-brnf package contains the ebtables+bridge-nf patch. Be sure to check out the ebtables hp. This site also contains the arptables userspace tool.
40.96 KB  
Utilities  -  SaraB 1.0.0
SaraB works with DAR (Disk ARchive) to schedule and rotate backups on random-access media (i.e. hard drives, CDs, DVDs, Zip, etc. Basically anything except magnetic tapes.) This reduces hassle for the administrator by providing an automatic backup...
20.48 KB