Watch Those Wildcards

A RAID array may save your data from drive failure, but it won’t protect it from brain farts.

heide:/media/video/anime$ mkdir tmp ; cd tmp
heide:/media/video/anime/tmp$ cp ../bagi_part*
heide:/media/video/anime/tmp$ ls
heide:/media/video/anime/tmp$

Wait, what did I just do…

I just copied the part 1 file over top of the part 2 file, that’s what… Gotta be careful with those wildcard expansions, especially when ‘cp’ and ‘mv’ are involved. (In this case I forgot the ‘.’ parameter at the end to tell it to copy the files here instead of over each other.)

Fortunately I hadn’t wiped the Linux partition on the old system yet and could recopy it back from there. Laziness pays off sometimes…

One thought on “Watch Those Wildcards”

  1. Only got two things to say:

    1.) Been there, done that, slapped forehead until bald.

    2.) How many times have you laughed at me for doing that? :-)

Leave a Reply

Your email address will not be published. Required fields are marked *