howell@MITRE.ARPA (Chuck Howell) (05/13/85)
> What happens if one (by mistake) creates a file called `ctl-foo' and one > didn't know that this was happening. The next time they did an `ls' > of that directory they'd get a `?' and it would be impossible to remove > because they don't know the name. If you really want to know the (non-printing) characters in your filename, you can always ls > somefile.tmp, then vi (or emacs, or od -c, or whatever...) somefile.tmp. [This works on ULTRIX anyway].
dixon@rtp47.UUCP (Wally Dixon) (05/14/85)
For those of you with System V Release 2 Unix (or derivatives thereof), "ls -b" will print non-graphic characters in filenames in octal \ddd notation. This is much simpler than ls'ing, then vi'ing or piping through cat -v. For those without system V.2 ls, another way is to "od ." . You will see some extra junk, but the filenames should be recongnizable, and followed by \000.
vause@ncrcae.UUCP (Sam Vause) (05/15/85)
In article <10612@brl-tgr.ARPA> howell@MITRE.ARPA (Chuck Howell) writes: >> What happens if one (by mistake) creates a file called `ctl-foo' and one >> didn't know that this was happening. The next time they did an `ls' >> of that directory they'd get a `?' and it would be impossible to remove >> because they don't know the name. > >If you really want to know the (non-printing) characters in your >filename, you can always ls > somefile.tmp, then vi (or emacs, or >od -c, or whatever...) somefile.tmp. [This works on ULTRIX anyway]. One (perhaps less-than-obvious) method of getting rid of weird files is by the judicious use of "rm -i *". Sure gets rid of the Klingons!
seth@megad.UUCP (Seth H Zirin) (05/16/85)
> What happens if one (by mistake) creates a file called `ctl-foo' and one > didn't know that this was happening... I always do an "od -xc" of the directory which tells what the character is. -- ------------------------------------------------------------------------------- Name: Seth H Zirin USmail: Megadata Corp. 35 Orville Dr., Bohemia, NY 11716 Phone: 516-589-6800 (M-F 9-5 EST) UUCP: {decvax, ihnp4}!philabs!sbcs!megad!seth Keeper of the News for megad
ahby@meccts.UUCP (Shane P. McCarron) (05/19/85)
>> What happens if one (by mistake) creates a file called `ctl-foo' and one >> didn't know that this was happening. The next time they did an `ls' >> of that directory they'd get a `?' and it would be impossible to remove >> because they don't know the name. >If you really want to know the (non-printing) characters in your >filename, you can always ls > somefile.tmp, then vi (or emacs, or >od -c, or whatever...) somefile.tmp. [This works on ULTRIX anyway]. Another method, although somewhat less accurate, would be to type 'rm *foo'. This should eliminate the entire problem. -- Shane P. McCarron Minnesota Educational Computing Corporation - Technical Services UUCP circadia!meccts!ahby {ihnp4,mgnetp,uwvax}!dicomed!mecc!meccts!ahby
david@ecr1.UUCP (David Haynes) (05/23/85)
As one who, due to some untrained users, is faced with file names of this sort quite often, I find that the best method of action is as follows: 1. use ls | od -ac | more to find out what its called. 2. use rm -i * or rm -i .* to get rid of it. This seems to work all the time. David Haynes Emerald City Research Inc. ..!utzoo!ecrhub!ecr1!david "Its common to mistake intelligence as the true opposite of supidity. In fact, the true opposite of stupidity is opposite stupidity."