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:

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

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

find question

2023-12-29 Thread Richard Hector
Hi all, When using: find $dir -mtime +7 -delete 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? And how precise are those times? If I'm running a cron job that deletes 7-day-old directories

find question

2000-08-03 Thread Shao Zhang
Hi, can somebody help me with this one? % find `pwd` \( -name *.log -o -name *.aux \) /home/shao/report/main.log /home/shao/report/main.aux /home/shao/report/title.aux /home/shao/report/abstract.aux % find `pwd` \( -name *.log -o -name *.aux \) -exec 'rm {}' ';' find: rm

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 rm

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 this, but

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

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-03 Thread Andrew Kae
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.org Subject: RE: find question Date: Fri, 30 Jun 2000 13:47

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 dir -atime 3 -print and nothing prints out. but when i do : find dir -atime 2 -print it prints stuff out. If it's been accessed in 2 days, it's been accessed in 3 days right? Unless it

find question

2000-06-30 Thread Andrew Kae
Hello, I've been looking through the find web page and I'm still not sure if I'm correct. Say I'm running a web server on a.com. After telnetting into the box, i want to know how often certain parts have been accessed. say the directory structure is: ../ index.html dir1/ dir2/ and a bunch

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 turn off

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-remove, but

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 remove

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, however. (And

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? It's

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

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 know how

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 doesn't

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 following but

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 of

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 of the

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 need

find question (and xargs)

1996-05-13 Thread Erick Branderhorst
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