Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

30 January 2012

Extracting Individual Files from an Archive

Too often, I only need a single file or a couple of files from an archive.
One answer to this is to just extract the entire archive so that I can
get to those particular files.  The more precise answer is to simply
extract only those files that I need and place them where I want them.

16 April 2011

Enabling Local FS Quotas in Linux

Quotas allow you to limit the amount of space a user or group can use
and / or the number of files a user or group can create on a filesystem
(FS).  The following shows how to set up these quotas and the expected
user experience.  Our host details for this are:

27 March 2011

Finding Open Files in Linux

Finding open files in Linux is quite similar to finding them in FreeBSD
and Solaris.  Here, we'll specifically identify open files on a particular
filesystem (FS) within a Linux environment.  Our host details this
time are:

25 March 2011

Finding Open Files in FreeBSD

Following up the same in Solaris, here's how to identify open files on
a particular filesystem (FS) in a FreeBSD environment.  Our host details
for this are:

23 March 2011

Finding Open Files in Solaris

During a recent discussion, another sysadmin asked that I write him a
tool to identify any open files on a particular file system (FS) in a
Solaris environment.  Rather than reinvent the wheel, I provided him
with the steps outlined here.  Our host details are:

21 November 2010

Overlaid Mount Problem

In UNIX environments, it's not uncommon to see various file systems (FS)
mounted, be it local storage, fiber attached from a SAN, network based
like NFS, etc.  These mounts may be exist for any number of reasons,
such as application data, user home directories, additional log space,

09 November 2010

Removing / Recovering an Open File (Linux)

Following up on "Removing / Recovering an Open File (Solaris)," the aim
here is to do the same with Linux.  The setup is the same, wherein a
'tail' is run in another terminal to hold open a file descriptor to a
file, while said file is accidentally removed.  Though the following

03 November 2010

Free Space and Inodes

Have you ever exhausted capacity on a volume when it still shows storage
space available?  The following details such a situation where the
intention is to simply copy some man pages into a directory.

29 October 2010

Fix a Broken chmod, or How to chmod chmod

So here's the setup.  You've logged into one of your servers to update
permissions on a file only to see this:

        server [0] /bin/chmod +x /opt/somefile

21 October 2010

Removing / Recovering an Open File (Solaris)

While working with filesystems, one will inevitably have to deal with a
file that is quickly growing and becoming unmanageable.  Unfortunately,
this situation normally becomes evident because the space of a volume
has been nearly exhausted.  If retention is necessary, you could set up

19 October 2010

Fun with FACLs

Quick, think of a way to give a specific user (jdoe) access to a
particular set of files which are owned by a different user (ivan)
and group (moskau).  Depending of what you are trying to accomplish,
I can immediately think of 7 ways:

18 October 2010

Strange Filenames

Inevitably, while working on a server, one will come across a file with a
strange name that seemingly cannot be easily operated upon.  Some examples
of commonplace files tend to be "!" and "@", wherein the "strange" file
was created while working perhaps in vi.  Other examples may be "--", "*",

Simple Pattern Replacements

Managing data within a file sometimes requires that all instances of a
specific word / phrase be replaced with that of another.  This could be
something along the lines of a file from one host is copied to another,
thus the hostname contained in the file must be updated to reflect the