Linux HOWTOs

About | Home | Search

HOWTO: fileutils
Description: GNU file management utilities
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# fileutils, sh-utils, and textutils have all been combined into coreutils.
# Unless you specifically need to use the individual old packages, you should
# move to coreutils instead of installing/upgrading fileutils.

# The latest version of fileutils that was created before coreutils was
# released was version 4.1.11, according to the fileutils home page.  It's
# available here:
# ...but don't be surprised if it goes away in the future.  Based on the
# fact that this version is available at and not,
# that would normally indicate that it's an alpha or beta version.

# I haven't used fileutils in a long time, if you find anything broken in
# here, let me know (e-mail link is at the bottom).

# GNU fileutils 4.1
# =================
# Prerequisites:
# gawk
# perl (optional)
# libiconv

test -f installed/fileutils-4.1.tar.gz && mv installed/fileutils-4.1.tar.gz .
test ! -f fileutils-4.1.tar.gz &&

# Verify tarball w/ md5sum:
echo "2fa04ceee87e962ddf72f32a2d6b906d  fileutils-4.1.tar.gz" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "fileutils-*" -exec rm -r {} \;
tar xzvf ~/fileutils-4.1.tar.gz
cd fileutils-4.1
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc --disable-nls
( cd src ; \
  strip chgrp chmod chown cp dd df dircolors du ginstall ln ls \
  mkdir mkfifo mknod mv rm rmdir shred sync touch dir vdir )

# Become root to install it
make install
rm -f /etc/DIR_COLORS /var/adm/packages/fileutls /var/adm/packages/fileutils-*
rm -rf /usr/doc/fileutils-*
mv -f /bin/install /usr/bin/ginstall
ln -sf /usr/bin/ginstall /usr/bin/install
cd /usr/man/man1
rm -f chgrp.1.gz chmod.1.gz chown.1.gz cp.1.gz dd.1.gz df.1.gz \
 dircolors.1.gz du.1.gz ginstall.1.gz ln.1.gz ls.1.gz mkdir.1.gz \
 mkfifo.1.gz mknod.1.gz mv.1.gz rm.1.gz rmdir.1.gz touch.1.gz \
 shred.1.gz sync.1.gz

# Create a /etc/profile.d/ that'll set ls with some common
# options.  Slackware's patched ls/dircolors takes care of this, the "real"
# versions don't.  If you have a really old version of Slackware, add the
# alias line to /etc/profile (or ~/.bash_login, ~/.profile) instead.
echo '#!/bin/sh' > /etc/profile.d/
echo "alias ls='ls --color=auto -F -b -T 0'" >> /etc/profile.d/
chmod +x /etc/profile.d/

# Become yourself again

mkdir -p -m 0700 installed
rm -f installed/fileutils-*.tar.*
mv fileutils-4.1.tar.gz installed/

Back to the list

Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>