LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   cd to directory variables (https://www.linuxquestions.org/questions/linux-server-73/cd-to-directory-variables-4175735029/)

vinmansbrew 03-18-2024 12:04 PM

cd to directory variables
 
I have an old server, rhel 7.9, that just got dropped into my lap.
I need to locate something, but I noticed something I hadn't seen before.
Doing a locate, I had a path show up that looked like this:
/\var
It appears to take my jut to the normal /var, but any reason it shows a \?
Might be nothing, I've just never seen a backslash in a directory path.

Nevermind, figured it out. Now, how to delete this post.

Keith Hedger 03-18-2024 03:38 PM

Really bad manners to delete posts!, Post your solution and mark the thread solved via the thread tools.

scasey 03-18-2024 04:02 PM

Yes. Please share what you learned when you "figured it out"

vinmansbrew 03-21-2024 04:56 PM

I suppose it wasn't so much figuring it out, but I'd never seen something like that.
Basically, what it was was //var//www, instead of the typical /var/www. I had to use a different command that what I normally use, to see it, dir
Pretty basic, I'd never used dir before, but then I'd never seen /\ before, either.

Just comes down to finding something new.

MadeInGermany 03-25-2024 01:07 AM

dir is not standard.
Figure it out with
Code:

type dir
which dir

Do the same with ls
Try \ls to bypass aliasing.
Try ls -N to disable quoting.

vinmansbrew 03-25-2024 09:53 AM

\ls does the same as dir, for me.
ls -N doesn't do anything different than ls. Again, for me.
Point is, dir did the trick. It was just something new, I hadn't used before.

pan64 03-25-2024 11:11 AM

it exists: https://man7.org/linux/man-pages/man1/dir.1.html
or probably: https://www.gnu.org/software/coreuti...dir-invocation


All times are GMT -5. The time now is 02:45 AM.