CartMetrix - Do you know yours?

« Nolisting - Poor Man’s Greylisting | Home | Advanced OSX Mail Searches »

3/20/2007

Selecting Filenames with Non-Standard Characters in the Filename from the Shell

An erroneous cut and paste in an iTerm left me with a group of empty files named after hex color codes.

-rw-r--r-- 1 root root 0 Mar 20 16:54 #ffffb0,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #ffd850,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #ff50a8,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #cceedd,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #c8c8ff,

Trying to delete them provided a little bit of a problem:

[root@atlas bugs]# rm #*
rm: too few arguments
Try `rm --help' for more information.

The problem was the pound (#) character, the initial character in the filenames.

A little trial and error and I remembered a trick from my DOS day and working with long file names:

[root@atlas bugs]# rm "#"*
rm: remove regular empty file '#c8c8ff,'? y
rm: remove regular empty file '#cceedd,'? y
rm: remove regular empty file '#ff50a8,'? y
rm: remove regular empty file '#ffd850,'? y
rm: remove regular empty file '#ffffb0,'? y

Quoting the entire string "#*" won't work because of globbing the quotes make the asterisk part of the string and are never expanded.

Popularity: 21%

Trackback:

Related Posts

8 Responses to “Selecting Filenames with Non-Standard Characters in the Filename from the Shell”

  1. Buy ultram from discount store. said:

    Buy ultram.

    Buy ultram pharmacy online. Can you buy ultram in mexico. Buy ultram cheapest site. The mondego group wiki xwiki buy ultram. Buy ultram.

  2. Ambien during pregnancy. said:

    Buy ambien online.

    Buy ambien online no prescription. Ambien online. Ambien.

  3. Buy cialis order cialis buy cialis generic. said:

    Order cialis.

    Order cialis online. Buy cialis order cialis buy cialis generic.

  4. Hydrochloride tramadol. said:

    Cheap tramadol.

    Buy tramadol.

  5. Buy online cheap and fast tramadol. said:

    Tramadol online at lowest price on the web.

    Purchase tramadol online. Buy tramadol online save wholesale price yep. Buy online cheap and fast tramadol.

  6. Phentermine. said:

    Phentermine review.

    Phentermine 37 5mg. Phentermine. Buy phentermine online. Phentermine free shipping. Online phentermine. Buy cheap phentermine. Buy phentermine diet pill.

  7. Buy cheap phentermine. said:

    Phentermine tablet.

    No prescription phentermine. Phentermine prozac. Buy phentermine. Cheap phentermine. Buy phentermine online. Abuse phentermine. Phentermine diet pill. Pal pay phentermine.

  8. Buy tramadol. said:

    Buy tramadol online cod.

    Tramadol great buy. Where buy tramadol click here. Buy tramadol online cod. Buy tramadol. Buy cheap tramadol tramadol mg quick delivery cod.

Post your opinion

Verification Image

Please type the letters you see in the picture.

Subscribe without commenting


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It