Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a file of unknown origin on Mac OS X that appears as ^A or \001 or ? (question mark) depending on whether I'm looking at the output of ls or git:

(.env)Davids-MacBook-Pro:scripts watson$ ls
?       update_lot.py
(.env)Davids-MacBook-Pro:scripts watson$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   "\001"
nothing added to commit but untracked files present (use "git add" to track)
#(.env)Davids-MacBook-Pro:parent watson$ git status scripts/
^A             .env/          update_lot.py 

Does anyone know how to determine the file's origin, identity, and how to delete it? Various methods of listing it via quoting yield nothing.

share|improve this question
What's that file's size and content? – ott-- Dec 13 '12 at 14:27
ls -l shows the size, mc (if installed) or the finder show the content. – ott-- Dec 13 '12 at 14:34

closed as off topic by SvW, Michael Hampton, mdpc, HopelessN00b, Ward Dec 14 '12 at 4:00

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Most variants of ls(1) (if your MacOSX version cannot, install GNU fileutils and findutils) can give you the inode number of a file ... and most variants of find(1) can search by inode number and -exec rm on it...

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.