Le 10.07.2014 19:38, Steve Litt a écrit :
On Thu, 10 Jul 2014 10:29:02 +0200
berenger.mo...@neutralite.org wrote:
Le 09.07.2014 23:06, Steve Litt a écrit :
> Anyone who regularly uses nohup for this kind of thing should try
> the following:
>
> find / -type f -name nohup.out -exec ls -l {} +
Well... this, or simply append a "> /dev/null" in the end of the
command :)
I think you meant, do this:
Pardon me, I was not clear enough.
I was just saying that, instead of running your usual "$nohup foo", one
could simply run "$nohup foo > /dev/null"
I never pipe anything directly into a delete command, I'm too
chicken.
What I usually do is something more like this:
find / -type f -name nohup.out -exec ls -l {} + > danger.sh
Then I edit danger.sh to do the proper deletions, and remove anything
I
don't want to delete. Then I do this:
. ./danger.sh
rm -f danger.sh
This is an interesting approach, so I'm not so unhappy by my bad reply.
As you, I do not jun run my delete commands without testing, instead I
run the command twice: one which prints the list of files to delete,
then the one which actually deletes them, with some reading between
them. But in the situation that I would have tons of files, or if some
sensible file is added between the 2 commands, this would be dangerous,
unlike your approach. Thanks for sharing.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
https://lists.debian.org/fdd6709ca234c9e2c6b8d785b1dea...@neutralite.org