Skip to main content
added 6 characters in body
Source Link
heemayl
  • 58.1k
  • 9
  • 129
  • 144

In bash you can use extglob:

 $ shopt -s extglob  # to enable extglob
 $ cp !(b*) new_dir/

where !(b*)!(b*) exclude all b*b* files.

You can later disable extglob with

 $ shopt -u extglob

In bash you can use extglob:

 $ shopt -s extglob  # to enable extglob
 $ cp !(b*) new_dir/

where !(b*) exclude all b* files.

You can later disable extglob with

 $ shopt -u extglob

In bash you can use extglob:

 $ shopt -s extglob  # to enable extglob
 $ cp !(b*) new_dir/

where !(b*) exclude all b* files.

You can later disable extglob with

 $ shopt -u extglob
Source Link
rush
  • 28k
  • 9
  • 91
  • 115

In bash you can use extglob:

 $ shopt -s extglob  # to enable extglob
 $ cp !(b*) new_dir/

where !(b*) exclude all b* files.

You can later disable extglob with

 $ shopt -u extglob