perl-Linux-NFS-BigDir - use Linux getdents syscall to read large directories over NFS

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Linux-NFS-BigDir
Package version 0.004
Package release alt1
Package architecture noarch
Package type rpm
Installed size 50.94 KB
Download size 50.94 KB
Official Mirror
This module was created to solve a very specific problem: you have a directory over NFS, mounted by
a Linux OS, and that directory has a very large number of items (files, directories, etc). The number of entries
is so large that you have trouble to list the contents with `readdir' or even `ls' from the shell. In extreme
cases, the operation just "hangs" and will provide a feedback hours later.
I observed this behavior only with NFS version 3 (and wasn't able to simulate it with local EXT3/EXT4): you might find in different situations,
but in that case it migh be a wrong configuration regarding the filesystem. Ask your administrator first.
If you can't fix (or get fixed) the problem, then you might want to try to use this module. It will use the `getdents'
syscall from Linux. You can check the documentation about this syscall with `man getdents' in a shell.
In short, this syscall will return a data structure, but you probably will want to use only the name of each entry in the directory.
How can this be useful? Here are some directions:
=item 1.
You want to remove all directory content.
=item 2.
You want to remove files from the directory with a pattern in their filename (using regular expressions, for example).
=item 3.
You want to select specific files by their filenames and then test something else (like atime).
These are examples, but it should cover the vast majority of what you want to do. `getdents' syscall will be more effective because
it will not call `stat' of each of those files before returning the information to you. That means, you will have the opportunity to filter
whatever you need and then call `stat' if you really need.
I came up at `getdents' after researching about "how to remove million of files". After a while I reached an C program example that uses `getdents'
to print the filenames under the directory. By using it, I was able to cleanup directories with thousands (or even millions) of files in a couple of minutes,
instead of many hours.
This module i...


Package Version Architecture Repository
perl-Linux-NFS-BigDir - - -


Name Value
/usr/share/perl5 -
perl( -
perl( -
perl( -
rpmlib(PayloadIsLzma) -


Name Value
perl(Linux/NFS/ = 0.004
perl(Linux/NFS/BigDir/ = 0.004
perl-Linux-NFS-BigDir = 0.004-alt1


Type URL
Binary Package perl-Linux-NFS-BigDir-0.004-alt1.noarch.rpm
Source Package perl-Linux-NFS-BigDir-0.004-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Linux-NFS-BigDir rpm package:
    # sudo apt-get install perl-Linux-NFS-BigDir



See Also

Package Description
perl-Linux-Pidfile-0.16-alt1.noarch.rpm Pidfile handling to help control processes
perl-Linux-Proc-Maps-0.002-alt1.noarch.rpm Read and write /proc/[pid]/maps files
perl-Linux-Proc-Mountinfo-0.02-alt1.noarch.rpm Parse Linux /proc/ID/mountinfo data
perl-Linux-Proc-Mounts-0.02-alt1.noarch.rpm Parser for Linux /proc/mounts
perl-Linux-Proc-Net-TCP-0.07-alt2.noarch.rpm Parser for Linux /proc/net/tcp and /proc/net/tcp6
perl-Linux-ProcessInfo-0.01-alt1.noarch.rpm Interface to process information in Linux
perl-Linux-Slackware-SystemTests-0.01-alt1.noarch.rpm Test components of Slackware Linux for correctness
perl-Linux-Slackware-SystemTests-scripts-0.01-alt1.noarch.rpm Linux-Slackware-SystemTests scripts
perl-Linux-SocketFilter-0.04-alt1.noarch.rpm interface to Linux's socket packet filtering
perl-Linux-Statm-Tiny-0.0600-alt1.noarch.rpm simple access to Linux /proc/../statm
perl-Linux-Taskstats-Read-6.01-alt1.noarch.rpm perl module Linux-Taskstats-Read
perl-Linux-TunTap-0.001-alt1.noarch.rpm perl module Linux-TunTap
perl-Linux-Virt-0.15-alt1.noarch.rpm unified Linux virtualization wrapper
perl-Linux-hddtemp-0.01-alt1.noarch.rpm monitors hard drive temperatures using the linux hddtemp utility
perl-Linux-net-dev-1.00-alt1.noarch.rpm Perl extension for parsing /proc/net/dev