9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] walk updated, earth shatters
@ 2009-08-28 16:33 matt
  2009-08-28 16:37 ` erik quanstrom
  0 siblings, 1 reply; 5+ messages in thread
From: matt @ 2009-08-28 16:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

/n/sources/contrib/maht/walk.c

I adapted Dan's walk to add some options

-t : print trailing slashes on directories
-p : only print path (directory) names  # -d was taken
-f : only print file names

If -p and -f are given, all output is supressed but the walk still happens.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] walk updated, earth shatters
  2009-08-28 16:33 [9fans] walk updated, earth shatters matt
@ 2009-08-28 16:37 ` erik quanstrom
  2009-08-28 16:41   ` erik quanstrom
  2009-08-28 17:02   ` matt
  0 siblings, 2 replies; 5+ messages in thread
From: erik quanstrom @ 2009-08-28 16:37 UTC (permalink / raw)
  To: 9fans

sounds familiar.  i haven't needed an analog
to your -f option yet since the most common
use is
	grep -n pattern `{find /sys/src/|grep '\.[chys]$'

- erik


; man find

     FIND(1)                                                   FIND(1)

     NAME
          find - recursively list files.

     SYNOPSIS
          find [ -1dfq ] dir ...

     DESCRIPTION
          List each argument.  If the argument is a directory recur-
          sively list it's contents.  The default is to list the cur-
          rent directory.  Specifying -d prints only directories, -f
          supresses warnings, while -q supresses quoting the output
          for rc(1). With -1, mount points will not be traversed.

     SOURCE
          /sys/src/cmd/find.c

     SEE ALSO
          du(1)

     BUGS
          Feeping creaturism.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] walk updated, earth shatters
  2009-08-28 16:37 ` erik quanstrom
@ 2009-08-28 16:41   ` erik quanstrom
  2009-08-28 17:02   ` matt
  1 sibling, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2009-08-28 16:41 UTC (permalink / raw)
  To: 9fans

On Fri Aug 28 12:40:58 EDT 2009, quanstro@quanstro.net wrote:
> sounds familiar.  i haven't needed an analog
> to your -f option yet since the most common
> use is
> 	grep -n pattern `{find /sys/src/|grep '\.[chys]$'

i forgot
	contrib/install quanstro/find

- erik



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] walk updated, earth shatters
  2009-08-28 16:37 ` erik quanstrom
  2009-08-28 16:41   ` erik quanstrom
@ 2009-08-28 17:02   ` matt
  2009-08-28 17:18     ` erik quanstrom
  1 sibling, 1 reply; 5+ messages in thread
From: matt @ 2009-08-28 17:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

erik quanstrom wrote:

>sounds familiar.  i haven't needed an analog
>to your -f option yet since the most common
>use is
>	grep -n pattern `{find /sys/src/|grep '\.[chys]$'
>
>
>
I changed it to do this :

chmod 550 `{walk -p}
chmod -w `{walk -f}





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] walk updated, earth shatters
  2009-08-28 17:02   ` matt
@ 2009-08-28 17:18     ` erik quanstrom
  0 siblings, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2009-08-28 17:18 UTC (permalink / raw)
  To: 9fans

> I changed it to do this :
>
> chmod 550 `{walk -p}
> chmod -w `{walk -f}

i do this so seldom, that i'm satisfied with

	for(i in `{find})
		test -d $i && chmod 550 $i || chmod -w $i

- erik



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-28 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-28 16:33 [9fans] walk updated, earth shatters matt
2009-08-28 16:37 ` erik quanstrom
2009-08-28 16:41   ` erik quanstrom
2009-08-28 17:02   ` matt
2009-08-28 17:18     ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).