[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: small 'rmdir' bug on EL3 and EL4?



On Tue, 2007-09-04 at 07:03 +0800, John Summerfield wrote:
> Rainer Traut wrote:
> > Hi,
> > 
> > my cron scripts send me error messages though I cannot find any error.
> > 
> > An example:
> > 
> > [tr report ~]$ cd /tmp
> > [tr report tmp]$ mkdir myDir
> > [tr report tmp]$ rmdir -v myDir/ 2>&1 >/dev/null
> > rmdir: Verzeichnis wird entfernt, myDir/
> > [tr report tmp]$ echo $?
> > 0
> > [tr report tmp]$
> > 
> > It seems the verbose rmdir output goes to error out.
> > Should I file BZ?
> 
> I see a problem in front of the keyboard.
> 
> The explanation I learned in respect of OS/2 many years ago want like this:
> '2>&1" means close 2, fdup(1) # Duplicate 1 to 2.
> '>/dev/null' means close 1, open 1->/dev/null
> 
> 2 is left pointing to where 1 was before.
----
which is why I would tend to direct output to the file first...

rmdir -v myDir > /dev/null 2>&1

Craig


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]