Some simple questions

Anon rkumar at buddha.usc.edu
Mon Nov 27 13:41:46 AEST 1989


Here are some questions related to file management under UNIX.

1) dir-a and dir-b are two directories. Both may have files
	with same names. How does one move the latest versions
	of the files from dir-b to dir-a? In other words, I
	want

	foreach file f in dir-b do
		if (f does not exist in dir-a) then
			copy f from dir-b to dir-a
		else
			/* let f-a be the corresponding copy in dir-a */
			if (f is more recent than f-a)
				move f from dir-b to dir-a
	endfor

2) Suppose that a text file f is being included (e.g., #include)
	in more than one source. What is, if there is, a mechanism to
	protect file f from being accidentally deleted/modified?
	Preferably, rm, mv, etc should be able to detect
	if f is being used in some other file. The user may
	be expected to explicitly state that f is being used
	in source s when s is created.


Please e-mail your responses, and I will post a summary next
week.

Thanks,

Ravi
 

.........................................     .
The Hanu-man Logo which is                   `'\`' (wtlifter at hanuman.edu)
now selling like hot turkey :->              _/ \_
										



More information about the Comp.unix.questions mailing list