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
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
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
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 th
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
> % 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
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
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
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
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
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
>
> 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
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 o
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
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, i
>>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,
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
[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?
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
> 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
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
>
> 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
>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
> 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
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
25 matches
Mail list logo