[Tutor] ls *.py[co] >> .hidden
Steven D'Aprano
steve at pearwood.info
Thu May 21 18:11:12 CEST 2015
On Thu, May 21, 2015 at 03:54:20PM +0100, Bod Soutar wrote:
> ls *.pyc *.pso >> .hidden
>
> should work
[...]
> As this adds specific results of ls you will need to schedule the
> command through cron to get it to automatically add new files
Yes, but that's the point isn't it? If Nautilus understands regular
expressions, then instead of listing every single .pyc file by name,
potentially thousands of them, you just need a single entry:
.*pyc
to hide *every* .pyc file. Or use .*py[co] for .pyc and .pyo files.
If Nautilus *doesn't* understand regular expressions, well, that's just
another example of why Gnome is not good enough for serious work.
This suggests that Nautilus doesn't accept wildcards:
http://ubuntuforums.org/showthread.php?t=1730696
--
Steve
More information about the Tutor
mailing list