bash - Why extglob except breaking except condition? -


i run in debian 8.1, gnu bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) , lenovo g50-30 500 gb ssd , 8 gb flash memory:

shopt -s extglob cp -r !(backups.backupdb/) /home/masi/documents/ 

but copy directory backups.backupdb/, confirmed @ end of copying.

messages during copying process

after 2h copying

cp: cannot stat ‘backups.backupdb/masi\’s macbook air/2015-06-25-233115/macintosh hd/system/library/image capture/automatic tasks/makepdf.app/contents/resources/ko.lproj/3x5로 자르기.mkpdf’: no such file or directory cp: cannot stat ‘backups.backupdb/masi\’s macbook air/2015-06-25-233115/macintosh hd/system/library/image capture/automatic tasks/makepdf.app/contents/resources/ko.lproj/3x5에 맞추기.mkpdf’: no such file or directory ... cp: cannot stat ‘camera uploads/2015-06-29 11.51.36.jpg’: invalid argument cp: cannot stat ‘camera uploads/2015-06-29 11.51.53.jpg’: invalid argument cp: cannot stat ‘camera uploads/icon\r’: invalid argument cp: cannot stat ‘cancer’: invalid argument cp: cannot stat ‘cardio bad/atria-en-ventrikels.swf’: invalid argument cp: cannot stat ‘cardio bad/extreme_90_180.swf’: invalid argument cp: cannot stat ‘cardio databases tools’: invalid argument cp: cannot stat ‘cardiology’: invalid argument ... 

where keep unexpected browsing through backup folder. challenge here backups.backupdb several tbs , seeing goes browsing not feel good.

no symbolic links

i run

ls -lr /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/ |grep backup 

getting

ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/cancer: invalid argument ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/cardio databases tools: invalid argument ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/cardiology: invalid argument drwxr-xr-x 1 root root          7 jul  8 20:25 backups.backupdb ls: cannot open directory /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/animations/embryology/e17_files: permission denied ^c 

so directory not symlink. why extglob except condition broken here browsing folder?

try removing backslash (i adding echo test purposes):

shopt -s extglob echo cp -r !(backups.backupdb) /home/masi/documents/ 

it works in environment (gnu bash, version 4.3.30, os x)


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -