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

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

Serving Software Downloads in 956 Categories, Downloaded 50.347.732 Times

cmdfs for Linux 0.3

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

cmdfs for Linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (36 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
USER REVIEWS
More Reviews or Write Review


CMDFS FOR LINUX RELATED
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...
 
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...
 
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  
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.
 
Security Tools  -  Portable Square Privacy Cleaner 1.2.1.0
With one simple mouse click, Square Privacy Cleaner allows you to erase Windows traces, recent opened documents, prefetch files, clipboard cache, MRU lists, temp folders, junk files, making PC operation fast and smooth. You can clean Internet...
358 KB  
Security Tools  -  Square Privacy Cleaner 1.1.0.0
With one simple mouse click, Square Privacy Cleaner allows you to erase Windows traces, recent opened documents, prefetch files, clipboard cache, MRU lists, temp folders, junk files, making PC operation fast and smooth. You can clean Internet...
358 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, UTILITIES
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
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  
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 2.4.37.9
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  
Utilities  -  Command Not Found 0.2.41
Command Not Found is a program that uses a cache of existing programs and their associated packages to aid users in their day-to-day command-line work. Usage: command-not-found [options] Options: ...
30.72 KB