On Mon, 17 Mar 2003, Tom Parquette wrote:

> The closest I can come to determining the size of the output file from
> tar (e.g.ad0s1a.tgz) is: file_size=`du -k /tmp/ad0s1a.tgz`.

You can get just the first coloumn of something by doing something like

du -k /tmp/ad0s1a.tgz | awk '{ print $1 }'.

That should help you a bit for that


> 2) I have a function written that will tar/gzip the filesystem then
> split it into pieces that will be turned into .iso files that will be
> fed to burncd.  I would like to capture the output of commands (e.g. ls
> -l /tmp/ad0s1a.*) into a "table" that I can examine to determine what
> was output by the split command so I know what mkisofs commands, and how

Could you do something like

for i in /tmp/ad0s1a.tgz.?? ; do mkiosfs ..... ; done

>  I also hope to use the same technique for determining what filesystems
> I have to backup in the first place.  e.g. If I do a df command I want
> to pull out the filesystem name and what mountpoint it is on.  The

You might have slightly nicer format if you use just the "mount" command
on its own. If you couple it with the awk command say

mount | awk '{ print $1,$2 }'

Play have fun :)

Rgds

Rus
--
http://www.65535.net | MSN: [EMAIL PROTECTED] | e: [EMAIL PROTECTED]
                  "More bits for your bite"
        Lifetime FreeBSD + Linux Hosting and Shell Accounts
             Please respect RFC1855 and don't top post

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to