[clug] how can I know umount command do success!
Stephen Jenkin
sjenkin at canb.auug.org.au
Wed Jan 26 04:49:46 GMT 2005
What are you trying to do with your script???
So seem to be removing the contents of the file trees in '/' filesystem
hidden by /volume1 & /volume2... Quite an odd thing to do...
Did you mean to clean the two mounted volumes, _then_ unmount them?
Try 'rm -rf', I think 'rm' is getting confused with the '-d' switch as
well.
'rm -rf /volume1' _will_ remove the directory, you don't need '-d' to do
that.
From=20the man page:
-d, --directory
unlink FILE, even if it is a non-empty directory
-f, --force
ignore nonexistent files, never prompt
-r, -R, --recursive
remove the contents of directories recursively
sj
On Wed, 26 Jan 2005, [gb2312] =C2=E9=D1=A9=F2=D4 wrote:
> hi,
> now my linux have mount two file system: the 'df' prints following info=
rmation:
> =20
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda1 5044156 188084 4599840 4% /volume1
> /dev/hdb1 5044156 188084 4599840 4% /volume2
>=20
> I write a shell as followed:
> =20
> #/bin/sh
> umount /volume1
> rm -dfr /volume1
> umount /volume2
> rm -dfr /volume2
>=20
> but when the shell excutes , I often causes error! I think it may be
> the umount command hasn't
> finished, then the rm has worked!
>=20
>=20
> --=20
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
>=20
Steve Jenkin, Unix Sys Admin
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA
sjenkin at canb.auug.org.au http://www.tip.net.au/~sjenkin
More information about the linux
mailing list