🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

7 total messages Started by Dennis Bednar Fri, 04 Jul 1986 04:57
find -inum option undocumented
#318
Author: Dennis Bednar
Date: Fri, 04 Jul 1986 04:57
13 lines
925 bytes
The -inum option of find(1) which finds files based on
i-node number is undocumented in the man pages.

By the way, what does the -depth option of find do?
The man page for cpio attempts to explain what the -depth
option of find does, but I'm confused.

Also the man page for find doesn't describe -depth either.


-- 
-Dennis Bednar
{decvax,ihnp4,harpo,allegra}!seismo!rlgvax!dennis	UUCP
Re: find -inum option undocumented
#319
Author: Doug Gwyn
Date: Fri, 04 Jul 1986 23:09
11 lines
1108 bytes
In article <1036@rlgvax.UUCP> dennis@rlgvax.UUCP (Dennis Bednar) writes:
>By the way, what does the -depth option of find do?

Forces a depth-first traversal of the directory hierarchy.
The main value of this is that a later restore using cpio
can handle read-only diretories properly, since they'll
not be made read-only until all their files are in place.

>Also the man page for find doesn't describe -depth either.

Whose manual?  I think it's in the current one from AT&T.
Re: find -inum option undocumented
#321
Author: Geoff Kuenning
Date: Tue, 08 Jul 1986 20:48
26 lines
1754 bytes
In article <1036@rlgvax.UUCP> dennis@rlgvax.UUCP (Dennis Bednar) writes:

> The -inum option of find(1) which finds files based on
> i-node number is undocumented in the man pages.

This is true.  However, the BUGS section should mention that, for almost
all applications, ncheck(1m) is a much better way to locate a file based
on its i-node number.

> By the way, what does the -depth option of find do?
> The man page for cpio attempts to explain what the -depth
> option of find does, but I'm confused.
> 
> Also the man page for find doesn't describe -depth either.

The -depth option changes the behavior of "find / -print" so that the
name of a directory is printed *after* the contents, instead of before.
In data-structure terminology, it changes the directory tree search from
preorder to postorder.  It is useful with cpio because, with the -m switch,
it causes the directory's modification time to be updated *after* all files
have been placed in it--otherwise, placing the next file would wipe out that
carefully-preserved mod time.
-- 

	Geoff Kuenning
	{hplabs,ihnp4}!trwrb!desint!geoff
Re: find -inum option undocumented
#320
Author: mikel
Date: Wed, 09 Jul 1986 20:48
22 lines
1408 bytes
> By the way, what does the -depth option of find do?
> The man page for cpio attempts to explain what the -depth
> option of find does, but I'm confused.
>
> Also the man page for find doesn't describe -depth either.
>
> -Dennis Bednar
> {decvax,ihnp4,harpo,allegra}!seismo!rlgvax!dennis	UUCP

From my man page from "AT&T 3B2 Computer Unix System V User Reference Manual"

"   -depth	Always true; causes descent of the directory hierarchy to
		be done so that all entries in a directory are acted on
		before the directory itself. This can be helpful when _f_i_n_d
		is used with _c_p_i_o_(_1_) to transfer files that are contained
		in directories without write permission."
-- 
    ___
   /   \		Mikel Manitius @ AT&T-IS Altamonte Springs, FL
  | RPI |		...{seismo!akgua|ihnp4|cbosgd|mcnc}!codas!mikel
  |  .  | 
\\-------//
Re: find -inum option undocumented
#322
Author: guy
Date: Thu, 10 Jul 1986 18:58
13 lines
1116 bytes
> This is true.  However, the BUGS section should mention that, for almost
> all applications, ncheck(1m) is a much better way to locate a file based
> on its i-node number.

Only if you have read permission on the partition containing the file system
you're searching - which normal users will not have if the system
administrator is sane.  In most cases, it is the administrator who's
searching for that file, so this is not a problem.  (Then again, I can't
remember the last time I searched for a file by i-number anyway.)
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com (or guy@sun.arpa)
Re: find -inum option undocumented
#324
Author: glen
Date: Mon, 14 Jul 1986 14:40
15 lines
1196 bytes
In article <625@codas.ATT.UUCP> mikel@codas.UUCP writes:
>
>"   -depth	Always true; causes descent of the directory hierarchy to
>		be done so that all entries in a directory are acted on
>		before the directory itself. This can be helpful when _f_i_n_d
>		is used with _c_p_i_o_(_1_) to transfer files that are contained
>		in directories without write permission."
>-- 

Another use for this option is to clean out your disk directory hierarchy of
directories, empty except for other directories.

	find / -depth -type d -exec rmdir >& /dev/null
or better:
	find / -depth -type d -print | xargs rmdir >& /dev/null
Re: find -inum option undocumented
#328
Author: Davidsen
Date: Mon, 04 Aug 1986 16:52
33 lines
2234 bytes
In article <232@desint.UUCP> geoff@desint.UUCP (Geoff Kuenning) writes:
>In article <1036@rlgvax.UUCP> dennis@rlgvax.UUCP (Dennis Bednar) writes:
>
>> By the way, what does the -depth option of find do?
>> The man page for cpio attempts to explain what the -depth
>> option of find does, but I'm confused.
>> 
>> Also the man page for find doesn't describe -depth either.
>
>The -depth option changes the behavior of "find / -print" so that the
>name of a directory is printed *after* the contents, instead of before.
>In data-structure terminology, it changes the directory tree search from
>preorder to postorder.  It is useful with cpio because, with the -m switch,
>it causes the directory's modification time to be updated *after* all files
>have been placed in it--otherwise, placing the next file would wipe out that
>carefully-preserved mod time.

I learn something every day! I admit to not using the mod time on
directories much, but I never thought of this. I always thought it was
to allow restoring a directory which is read-only, by creating it by
default (-d) and then fixing the permissions later. I have a few things
in directories which are mode 555 and don't create well on a new system
without -depth. Hope someone else learned something, too.
-- 
	-bill davidsen

  ihnp4!seismo!rochester!steinmetz!--\
                                       \
                    unirot ------------->---> crdos1!davidsen
                          chinet ------/
         sixhub ---------------------/        (davidsen@ge-crd.ARPA)

"Stupidity, like virtue, is its own reward"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads