The bigfiles command
locates each files f under
the directory <Dir> whose
size is greater than or equal to <Size>
and creates a symbolic link to f
in a file called n_f under a directory
called:
$HOME/BIGFILES/DirName
where $HOME
is the home directory of the user, BIGFILES
is
a directory under $HOME,
DirName
is a "string representation" of the complete path of <Dir>
and
n is a unique
integer prefix
(1,2,3,...). The string
representation of a directory /a/b/c is: _a_b_c, i.e., replace each "/"
with "_".
Example:
Assume
that
$HOME
=/home/wahab,
<Dir>=
/home/wahab/cs476 and
<Size>
=200.
Further,
assume that we have two files:
fall99/midterm
and
fall01/midterm
under <Dir> whose size are at least 200 KB.
Then
the program creates a directory called:
/home/wahab/BIGFILES/_home_wahab_cs476
and
two symbolic files:
1_midterm
whose value is /home/wahab/cs476/fall99/midterm
2_midterm
whose value is /home/wahab/cs476/fall01/midterm
The default value of <Dir>
is "."
(the current directory).
The default value of <Size>
is "100"
(the units of Size is KBytes).
If there is only one argument,
-
first see if it is a
directory.
If it is a directory D, then
the value of <Dir>
is D and the value of <Size>
is "100".
-
If it is not a directory, see if
it is an integer N.
If it is an integer N, then
the value of <Size> is
N and the value of <Dir>
is "."