Results 1 to 6 of 6
I did a strange thing today.
Code:
mv myfile.zip mydir#
Notice the hash symbol after my directory name. It hasn't created a directory, however I can view the contents of ...
- 11-13-2008 #1Just Joined!
- Join Date
- Nov 2008
- Location
- Ireland
- Posts
- 3
Linux filenames
I did a strange thing today.
Notice the hash symbol after my directory name. It hasn't created a directory, however I can view the contents of the zip file within the 'non directory' by using midnight commander.Code:mv myfile.zip mydir#
I cant find an explaination(googling) of what the hash does within a linux filename.
Im using Bash. Can anyone help?
- 11-13-2008 #2Linux User
- Join Date
- Jun 2007
- Posts
- 318
The hash symbol (or pound sign) has no special meaning in Linux filenames. It's just another character that can be used in filenames like the dash (-) or underscore (_).
- 11-14-2008 #3Just Joined!
- Join Date
- Nov 2008
- Location
- Ireland
- Posts
- 3
re:linux filenames
when I try to cd to the directory I get an error...
I can only open the directory in midnight commander. Why does it have this affect if it has no special meaning within a filename?Code:bash: cd: mydir#: Not a directory
- 11-14-2008 #4
You basically just renamed myfile.zip to mydir# it never was or is a directory. It's still the same data, you just renamed it. If you want to change it back: mv mydir# myfile.zip
If you can open it in a file browser, I think what you are seeing is the actual zip files.I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 11-14-2008 #5Just Joined!
- Join Date
- Nov 2008
- Location
- Ireland
- Posts
- 3
re:linux filenames
Lol!
Now I see!! I spent a good hour googling that
Now I can get on with what I was actually doing!
Cheers!
- 11-18-2008 #6Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
To be more concrete, '#' might or might not have an special meaning.
It has nothing to do with this issue, which was purely a confussion. But under some circumstances this character has a special meaning in bash.
Originally Posted by bash man page


Reply With Quote
