Re: find question

2024-01-13 Thread Greg Wooledge
On Sun, Jan 14, 2024 at 12:25:03AM +1300, Richard Hector wrote: > Except that from the man page, -delete implies -depth. Maybe that's a > GNUism; I don't know. Oh, maybe that's new? I'm not sure. Anyway, yeah, -delete is a GNUism. POSIX find doesn't have it at all. > That leaves the question: W

Re: find question

2024-01-13 Thread Richard Hector
On 30/12/23 01:27, Greg Wooledge wrote: On Fri, Dec 29, 2023 at 10:56:52PM +1300, Richard Hector wrote: find $dir -mtime +7 -delete "$dir" should be quoted. Got it, thanks. Will that fail to delete higher directories, because the deletion of files updated the mtime? Or does it get all the

Re: find question

2023-12-29 Thread Greg Wooledge
On Fri, Dec 29, 2023 at 10:56:52PM +1300, Richard Hector wrote: > find $dir -mtime +7 -delete "$dir" should be quoted. > Will that fail to delete higher directories, because the deletion of files > updated the mtime? > > Or does it get all the mtimes first, and use those? It doesn't delete dire

Re: find question

2000-08-03 Thread Sven Burgener
On Thu, Aug 03, 2000 at 10:11:38PM +0400, Alexey Vyskubov wrote: > > % find `pwd` \( -name "*.log" -o -name "*.aux" \) -exec 'rm {}' ';' > > find: rm /home/shao/report/main.log: No such file or directory [snipped Alexey's solution] It's nice to use xargs together with find. (You probably know thi

Re: find question

2000-08-03 Thread Alexey Vyskubov
> % find `pwd` \( -name "*.log" -o -name "*.aux" \) -exec 'rm {}' ';' > find: rm /home/shao/report/main.log: No such file or directory It tries to execute command rm[space]/home/shao/report/main.log. Of course there is no such command. You should execute 'rm' with filename as a parameter; so write

Re: find question

2000-07-05 Thread Michalowski Thierry
Andrew Kae wrote: > One last thing, does anyone know of a command to tell me last access date of > a file? > > Just try "ls -ul" ("man ls" will provide you much more options) HTH ( .02 euro) -- Thierry Michalowski / Edipresse Publications S.A

Re: find question

2000-07-05 Thread Andrew Kae
Hello everyone, Thank you for your support. I have a few more questions =) For reference, I am running Unix Sys V 4.0. TESTS Numeric arguments can be specified as +n for greater than n, -n for less than n, n for exactly n. I find this to be a

Re: find question

2000-07-03 Thread David Wright
Quoting Andrew Kae ([EMAIL PROTECTED]): > > The find's atime option seems a bit sketchy. > I've tried find -atime 3 -print and nothing prints out. > but when i do : > find -atime 2 -print > it prints stuff out. > > If it's been accessed in 2 days, it's been accessed in 3 days right? > > Unless

RE: find question

2000-07-03 Thread Andrew Kae
days, in which case, it's not a great feature since i have to check if directories have been accessed in 60 days! Any suggestions or comments? TIA From: "Sean 'Shaleh' Perry" <[EMAIL PROTECTED]> To: Andrew Kae <[EMAIL PROTECTED]> CC: debian-user@lists.debian.or

RE: find question

2000-06-30 Thread Sean 'Shaleh' Perry
> > dir1 and dir2 are web sites themselves. > > I want to know if anyone has accessed dir1 within the last 60 days. I've > been using find like this: > $ find dir1 -atime 60 -print > > Is this the correct command? looks sane, although I think atime is only set on files. Also, some people tur

Re: find question (and xargs)

1996-05-19 Thread Joseph Skinner
On Wed, 15 May 1996, Craig Sanders wrote: > > On 14 May 1996, Kai Henningsen wrote: > > > It's find that does the replacing. None of the {}s are in the find > > arguments, however. (And rm is not even in the xargs arguments!) > > > > Personally, I'd probably make a script for the split-and-rem

Re: find question (and xargs)

1996-05-17 Thread Ian Jackson
Erick Branderhorst writes ("find question (and xargs)"): > this might be a more unix oriented question but I'll ask it anyway > because it is very debian related too: > > I would like to find packages bigger than 459976 bytes and split them > with dpkg-split, if splitting is succesfull I'll remov

Re: find question (and xargs)

1996-05-16 Thread Richard Kettlewell
>>find / -size +459976c -noleaf -type f -name '*.deb'|\ >>xargs -n 1 dpkg-split -s {} && rm {} >> >>I was thinking that {} would be replaced by the filename but that's >>not the case. Anyone know how to solve this? > >It's find that does the replacing. None of the {}s are in the find >arguments,

Re: find question (and xargs)

1996-05-15 Thread Craig Sanders
On 14 May 1996, Kai Henningsen wrote: > It's find that does the replacing. None of the {}s are in the find > arguments, however. (And rm is not even in the xargs arguments!) > > Personally, I'd probably make a script for the split-and-remove, but > it should also work with a shell function. A fu

Re: find question (and xargs)

1996-05-15 Thread Kai Henningsen
[EMAIL PROTECTED] (Erick Branderhorst) wrote on 13.05.96 in <[EMAIL PROTECTED]>: > find / -size +459976c -noleaf -type f -name '*.deb'|\ > xargs -n 1 dpkg-split -s {} && rm {} > > I was thinking that {} would be replaced by the filename but that's > not the case. Anyone know how to solve this?

Re: find question (and xargs)

1996-05-14 Thread Guy Maor
On Mon, 13 May 1996, Erick Branderhorst wrote: > find / -size +459976c -noleaf -type f -name '*.deb'|\ > xargs -n 1 dpkg-split -s {} && rm {} > > I was thinking that {} would be replaced by the filename but that's > not the case. Anyone know how to solve this? Two mistakes and an admonition: You

Re: find question (and xargs)

1996-05-14 Thread Brian C. White
> find / -size +459976c -noleaf -type f -name '*.deb'|\ > xargs -n 1 dpkg-split -s {} && rm {} > > I was thinking that {} would be replaced by the filename but that's > not the case. Anyone know how to solve this? Find only replaces "{}" with the filename under "-exec". You have piped the output

Re: find question (and xargs)

1996-05-14 Thread Erick Branderhorst
Hi users, I found the solution (with help from Steve Preston, Kenvin Dalley, Ray Dassen and Jan Wender). now I use the following: find /home/ftp/pub/debian -size +459976c -noleaf -type f -name '*.deb'| \ xargs -l -i sh -c "dpkg --info {} >/dev/null && dpkg-split -s {} && rm {}" This gives a lot

Re: find question (and xargs)

1996-05-14 Thread joost witteveen
> > Hi all, > > this might be a more unix oriented question but I'll ask it anyway > because it is very debian related too: > > I would like to find packages bigger than 459976 bytes and split them > with dpkg-split, if splitting is succesfull I'll remove the package. > I have come at the follo

Re: find question (and xargs)

1996-05-14 Thread Jan Wender
>Hi all, > >this might be a more unix oriented question but I'll ask it anyway >because it is very debian related too: > >I would like to find packages bigger than 459976 bytes and split them >with dpkg-split, if splitting is succesfull I'll remove the package. >I have come at the following but it

Re: find question (and xargs)

1996-05-14 Thread J.H.M.Dassen
> I have come at the following but it doesn't work (and can't figger > out why not from the manpages). > > find / -size +459976c -noleaf -type f -name '*.deb'|\ > xargs -n 1 dpkg-split -s {} && rm {} > > I was thinking that {} would be replaced by the filename but that's > not the case. Anyone k