Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird directory name, can not switch into it....

Status
Not open for further replies.

bdina

Programmer
Jun 17, 2003
47
US
I have a user on my system that has created a subdirectory under their home directory called ~username, sor for example their username is foo, the directory is /home/foo/~foo. So, when I try and switch to /home/foo/~foo it takes me to /home/foo. I am using the bash shell, it is a red hat 7.3 system, how can I switch into this directory?
 
I'm sorry, what I meant to type was that I would switch into their directory and then switch to that subdirectory, so when I re-read my post, I realized that I should probably have entered the absolute directory, and when I did that, it worked just fine... so I switched to /home/foo/~foo and that is where I ended up.

thanks,
Bryan
 
This should be simple to resolve by using either of the folowing methods:

1) from /home/foo do: cd "~foo"
or
2) from /home/foo do: cd \~foo
or
3) from /home/foo do: cd ./~foo

Method (1) wraps the dir in quotes
Method (2) uses a backslash to "Escape" the tilde (~)
Method (3) says start from here ./ and change into ~foo

To remove or move that directory do the same with either rmdir or mv

Good Luck,
Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top