Xavier de Gaye
2015-11-08 15:54:35 UTC
New submission from Xavier de Gaye:
On archlinux during an upgrade, the package manager backups some files in /etc with a .pacnew extension. On my system there are 20 such files, 9 .pacnew files located in /etc and 11 .pacnew files in subdirectories of /etc. The following commands are run from /etc:
$ shopt -s globstar
$ ls **/*.pacnew | wc -w
20
$ ls *.pacnew | wc -w
9
With python:
$ python
Python 3.6.0a0 (default:72cca30f4707, Nov 2 2015, 14:17:31)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
The '**/*.pacnew' pattern does not list the files in /etc, only those located in the subdirectories of /etc.
----------
components: Library (Lib)
messages: 254344
nosy: serhiy.storchaka, xdegaye
priority: normal
severity: normal
status: open
title: a recursive glob pattern fails to list files in the current directory
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <***@bugs.python.org>
<http://bugs.python.org/issue25584>
_______________________________________
On archlinux during an upgrade, the package manager backups some files in /etc with a .pacnew extension. On my system there are 20 such files, 9 .pacnew files located in /etc and 11 .pacnew files in subdirectories of /etc. The following commands are run from /etc:
$ shopt -s globstar
$ ls **/*.pacnew | wc -w
20
$ ls *.pacnew | wc -w
9
With python:
$ python
Python 3.6.0a0 (default:72cca30f4707, Nov 2 2015, 14:17:31)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import glob
len(glob.glob('./**/*.pacnew', recursive=True))
20len(glob.glob('./**/*.pacnew', recursive=True))
len(glob.glob('*.pacnew'))
9len(glob.glob('**/*.pacnew', recursive=True))
11The '**/*.pacnew' pattern does not list the files in /etc, only those located in the subdirectories of /etc.
----------
components: Library (Lib)
messages: 254344
nosy: serhiy.storchaka, xdegaye
priority: normal
severity: normal
status: open
title: a recursive glob pattern fails to list files in the current directory
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <***@bugs.python.org>
<http://bugs.python.org/issue25584>
_______________________________________