julia> run(`ls *.pdb`)
ERROR: LoadError: parsing command `ls *.pdb`: special characters "#{}()[]<>|&*?~;" must be quoted in commands
and, since we are here, can that that error message be improved? Maybe is my poor english, but adding "*", or '*', or \*, does not work, so I do not understand what must be quoted means there.
By the way, specifically here I want to get the number of files satisfying *.pdb, so I am not even sure if this is the right track, since I noticed now that I cannot automatically get the output of to a variable. Two things to check there.
Another (not necessarily better, but sometimes most expedient) option is to just let your shell handle all the things that your shell normally handles:
julia> run(`sh -c 'ls -1d *'`)
base
cli
contrib
CONTRIBUTING.md
deps
doc
etc
HISTORY.md
julia
LICENSE.md
Makefile
Make.inc
Make.user
NEWS.md
README.md
src
stdlib
sysimage.mk
test
ui
usr
usr-staging
VERSION
Process(`sh -c 'ls -1d *'`, ProcessExited(0))