On Wed, 11 Dec 2013 12:09:18 +0100 "Gian Uberto Lauri" <sa...@eng.it> wrote:
> Sharon Kimble writes: > > I have this line in a bash script that is not doing what its > > supposed to - > > 'find /home/boudiccas/.fluxbox -type f -mtime +"$num" -name > > 'menu-*' -delete' > > where "$num" = 7 and 'menu-*'=menu-20131209-11:05 . Obviously the > > date and time can be different in each case, so how do I get it so > > that it deletes the menus if their number is greater than 7 > > please? All the rest of the script works as expected, except for > > this one line! > > Excuse me Sharon, I am not a native English speaker and I think my > English skills are not up to the task to fully understand your > message. > > You want to delete file modified more than 7 days ago (-mtime) or if > you have more of 7 of them? > > And what goes wrong with the command execution? > Thanks for replying. I want to delete the 'menu-*' files if there are more than 7, and the command is parsed when I have 'set -x' at the head of the script but this line does nothing! It runs but doesn't achieve anything. Sharon. -- A taste of linux = http://www.sharons.org.uk efever = http://www.efever.blogspot.com/ efever = http://sharon04.livejournal.com/ my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2 Registered Linux user 561944
signature.asc
Description: PGP signature