Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a Workgroup
How To:
Chapter 9886
NOTE bsize in the resulting output is the configured block size, in bytes, of the
file system /work. But in JFS file systems, the configured block size
determines only the block size of the direct blocks, typically the first
blocks written out to a new file. Indirect blocks, typically those added to
a file as it is updated over time, all have a block size of 8 kilobytes.
See mkfs_vxfs (1M) for an explanation of each field in the output.
You can also run mkfs -m on an HFS file system, but the output is less
friendly, lacking the labels. dumpfs, with grep for the parameter you’re
interested in, is better; see “Checking NFS Server/Client Block Size” on
page 730 for an example.
Moving a Directory (within a File System)
From time to time, a user needs to move a directory, say from
/home/
user
to /work/project5. The following may be helpful as a
cookbook.
Step 1. cp -r /home/
user
/
subdir
/work/project5/
subdir
Do not create /work/project5/
subdir
first.
Step 2. ll -R /home/
user
/
subdir
Step 3. ll -R /work/project5/
subdir
Step 4. Compare the output of the last two commands; if they match, proceed to
the next step.
Step 5. rm -r /home/
user
/
subdir
Step 6. Change permissions if necessary.
The above operation should leave the ownership intact, but if you have to
invoke the root user for some reason, the new files will all be owned by
root. There is an elegant way to change permissions throughout a
subtree:
cd /work/project5/
subdir
find . -print | xargs chgrp
usergroup
find . -print | xargs chown
user