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

Re: Using the find command



Alan,
from what I can see, it's just supposed to delete files and not touch
directories, any files name utmp or innd.pid.  the ! prefixing the
tests negates the test to pull the opposite.  By using xtype it's just
handling links differently.  This command shouldn't be deleting your
udev directory. (the ! -xtype d is the part that singles the
directories out).



On Tue, Jun 19, 2012 at 11:56 AM, Alan Chandler
<alan@chandlerfamily.org.uk> wrote:
> I am trying to debug why my system fails during bootup with udev failing.  I
> think its related to debian bug #677097
>
> mountall-bootclean.sh cleans the run directory. This program sources
> /lib/init/bootclean.sh
>
> Inside there is a function clean_all
>
> At one point it does
>
>    clean /run "! -xtype d ! -name utmp ! -name innd.pid" || ES=1
>    clean /run/lock "! -type d" || ES=1
>    clean /run/shm "! -type d" || ES=1
>
> which looks as though (with the "! - xtype d...") that its trying not to
> recurse down the subdirectories of /run (otherwise why follow the clean /run
> with clean /run/lock)
>
> the clean routine ends up passing its parameter to find
>
> what in effect is happening is its cd to /run
> then calls find
>
> find . "! -xtype d ! -name utmp ! -name innd.pid" -delete
>
> I tried running
> find . "! -xtype d ! -name utmp ! -name innd.pid"
>
> which is the same command without the -delete action - so I am assuming it
> "prints" the names instead
>
> What happens it that
>
> a) it lists all the files in all subdirectories
> b) it finishes up with a line which says find: `! -xtype d ! -name utmp !
> -name innd.pid': No such file or directory
>
> I guess this is what is ultimately wrong - since it deletes the /run/udev
> directory which udev is using.
>
>
> However I can't find any real documentation on find which explains why it
> outputs that error message.  Can any gurus out there explain
>
>
>
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject
> of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4FE0BD3D.60007@chandlerfamily.org.uk">http://lists.debian.org/[🔎] 4FE0BD3D.60007@chandlerfamily.org.uk
>



-- 
Shane D. Johnson
IT Administrator
Rasmussen Equipment


Reply to: