LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-18-2024, 12:04 PM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 192

Rep: Reputation: Disabled
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.

Last edited by vinmansbrew; 03-18-2024 at 12:16 PM.
 
Old 03-18-2024, 03:38 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Really bad manners to delete posts!, Post your solution and mark the thread solved via the thread tools.
 
Old 03-18-2024, 04:02 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Yes. Please share what you learned when you "figured it out"
 
Old 03-21-2024, 04:56 PM   #4
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 192

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-25-2024, 01:07 AM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,794

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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.
 
Old 03-25-2024, 09:53 AM   #6
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 192

Original Poster
Rep: Reputation: Disabled
\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.
 
Old 03-25-2024, 11:11 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,852

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash to find all placeholder variables in a file and replace will real variables spadez Programming 6 11-26-2013 12:24 PM
oustion about variables(PATH variables) mehrd@d Linux - General 2 08-04-2013 03:32 AM
Bash Script: parse active process stderr, strip, dump into variables, use variables TimeFade Programming 1 02-13-2010 06:09 AM
Threads synchronisation problem (mutex variables and contitional variables) zahadumy Programming 6 12-07-2005 12:30 PM
Shel scripting: variables pointing to variables and case Dark_Helmet Programming 5 06-08-2003 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration