Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Where is this 'var' directory?

Where is this 'var' directory?
Thread Tools
KellyHogan
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 03:39 PM
 
I've gone into root mode and done some command stuff. I'm just learning now. But where is this 'var' directory on the disk?
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 03:47 PM
 
At the root of your disk
It's invisible in OSX

type
"cd /var"
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 03:54 PM
 
I'm working with a video codec in beta and am supposed to copy the file, paste into 'var/flexlm' and then edit it. How do I do this? Also, is there some way to make the folders visible on the disk?
     
malvolio
Professional Poster
Join Date: Apr 2001
Location: Capital city of the Empire State.
Status: Offline
Reply With Quote
Jan 15, 2002, 03:58 PM
 
TinkerTool will allow you to show all folders/files, including invisibles. There is also a Terminal command to do this. But my favorite way is to use the fantastic freeware program RBrowser, which automatically shows you everything.
/mal
"I sentence you to be hanged by the neck until you cheer up."
MacBook Pro 15" w/ Mac OS 10.8.2, iPhone 4S & iPad 4th-gen. w/ iOS 6.1.2
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 04:12 PM
 
Originally posted by KellyHogan:
<STRONG>I'm working with a video codec in beta and am supposed to copy the file, paste into 'var/flexlm' and then edit it. How do I do this? Also, is there some way to make the folders visible on the disk?</STRONG>
Like said above, make the directory visible, then act like in normal folders
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 04:15 PM
 
Originally posted by KellyHogan:
<STRONG>paste into 'var/flexlm' and then edit it.</STRONG>
'var/flexlm' if this is a file (I don't know) use pico to edit it

type

"pico /var/flexlm"

if the file flexlm doesn't exist, it'll create one
if it does, it'll edit it
if it's a folder, you'll get an error
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 04:15 PM
 
Originally posted by malvolio:
<STRONG>TinkerTool will allow you to show all folders/files, including invisibles. There is also a Terminal command to do this. But my favorite way is to use the fantastic freeware program RBrowser, which automatically shows you everything.</STRONG>
Duh. I already had Tinkertool and forgot about it. Let me check...

...OK, man. There are so many hidden files. Back to my work, I have to copy a video encoder license to var/flexlm. But the file won't paste or drag into the folder. I'm in root mode. I don't get it. Should I use the Terminal to copy and then paste? If so, what are the commands (I know how to navigate the directories)?

So for example, if the codec file is in the desktop folder and I need to copy it to var/flexlm, what do I do?
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 04:16 PM
 
Originally posted by KellyHogan:
<STRONG>So for example, if the codec file is in the desktop folder and I need to copy it to var/flexlm, what do I do?</STRONG>
sudo cp "path to your file" "path where you xant to copy"

without the ", except if you have spaces in the names
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 04:37 PM
 
Originally posted by iNeusch:
<STRONG>

sudo cp "path to your file" "path where you xant to copy"

without the ", except if you have spaces in the names</STRONG>
Interesting. I got a DOS-Unix translation guide for the basic stuff but I'm getting into this now. I haven't picked up any Unix utils yet, first I have to understand the CLI. But it's quite addictive.

The codec copied across fine but still doesn't work. Crap beta.
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 04:41 PM
 
Originally posted by KellyHogan:
<STRONG>The codec copied across fine but still doesn't work. Crap beta.</STRONG>
Welcome to UNIX

Hope my commands were correct !
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 04:48 PM
 
Originally posted by iNeusch:
<STRONG>

Welcome to UNIX

Hope my commands were correct !</STRONG>
Yes, quite easy to understand so far. It feels natural enough.

By the way, nothing I do seems to make the Classic/XGrey theme work with Duality. I still get round buttons. I suspect this is a compatibility problem with Duality?
     
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Jan 15, 2002, 05:05 PM
 
Originally posted by KellyHogan:
<STRONG>By the way, nothing I do seems to make the Classic/XGrey theme work with Duality. I still get round buttons. I suspect this is a compatibility problem with Duality?</STRONG>
I wonder if the theme is complete... never worked for me
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 05:17 PM
 
Originally posted by iNeusch:
<STRONG>

I wonder if the theme is complete... never worked for me </STRONG>
Ahh, I see. I thought you made it.
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 05:20 PM
 
Here's one. I tried to delete a directory in Terminal but it reports that there are items in it. I initially did this:

-su
-root password
-cd .. (to go to the hard disks contents)
-rmdir color(name of the folder)

The message said that the directory had items in it.So what? Also, the items are locked so I can't delete them easily anyway. What command line do I use to delete the whole directory?
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jan 15, 2002, 05:45 PM
 
well, to remove a whole dir, use "rm -r &lt;dir_name&gt;"
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 05:58 PM
 
Originally posted by johann:
<STRONG>well, to remove a whole dir, use "rm -r &lt;dir_name&gt;"</STRONG>
Good line but didn't work because of the locked items in the folder. How do I bypass that?
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jan 15, 2002, 06:06 PM
 
is the sticky bit set on the dir?

try this:
sudo chmod 0777 &lt;dirname&gt;
then rm -rf &lt;dir&gt;
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 15, 2002, 06:12 PM
 
Originally posted by johann:
<STRONG>is the sticky bit set on the dir?

try this:
sudo chmod 0777 &lt;dirname&gt;
then rm -rf &lt;dir&gt;</STRONG>
i like to understand the commands. So far so good. I know 'chmod'. But what does 0777 mean?
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jan 15, 2002, 07:47 PM
 
chmod changes file permissions (stands for change mode)
there are two different way to change file permission with chmod, ones with numbers which repersent each permission mode and the other is with letters that represent the same thing (except with letters) for example:
chmod a+r &lt;file_name&gt; is the similar chmod 755 &lt;file_name&gt;
man chmod for more info.

so did that trick work? (since we are way off topic anyway..)
     
Hemingray
Forum Regular
Join Date: Nov 2001
Location: DP, OC, CA, US
Status: Offline
Reply With Quote
Jan 15, 2002, 07:51 PM
 
Originally posted by KellyHogan:
But what does 0777 mean?
777 is world readable, writable, and executable.
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 05:12 AM
 
Very strange. After doing the chmod and then rmdir, etc...I still get a Directory not empty message.
     
arn
Junior Member
Join Date: Dec 2001
Status: Offline
Reply With Quote
Jan 16, 2002, 05:21 AM
 
Originally posted by KellyHogan:
<STRONG>Very strange. After doing the chmod and then rmdir, etc...I still get a Directory not empty message.</STRONG>
You probably didn't need to chmod.

Basically "rmdir" won't remove a directory that has files in it. So, you can go into the directory and remove the files manually... or do a batch/recursive/forced remove...

this is far more dangerous - so know what you are doing.

if you want to remove a directory and all the files in that directory...

"rm -Rf &lt;dirname&gt;"

Note the capital R. Again... be VERY careful when using this command... it will erase everything in that directory and all subdirectories. If you perform this command on your top-level directory, it will procede to erase every file on your hard drive in seconds - without asking.

arn

[ 01-16-2002: Message edited by: arn ]
     
furtheraway
Junior Member
Join Date: Oct 2001
Location: nola, usa
Status: Offline
Reply With Quote
Jan 16, 2002, 07:00 AM
 
it's likely that you have invisible files in the directory in question. for example, in your home directory you might have hidden files like .cshrc, .profile or .plan.

these can be seen by adding an 'a' modifier to your 'ls' command.. like ls -a for a raw list including hidden files or ls -la for a vertical list with hidden files.

yes, it's possible to remove all the files within a directory recursively. however, i'd recommend that until you're comfortable with file locations and what they do, you may want to manually check for hidden files before blindly wiping out directories.
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 07:51 AM
 
I think for this one I will delete the folder from OS9!
     
furtheraway
Junior Member
Join Date: Oct 2001
Location: nola, usa
Status: Offline
Reply With Quote
Jan 16, 2002, 09:15 AM
 
kellyhogan, no offense.. but that's a really backwards way to delete that directory. in fact, it's a lot less safe.

by deleting from os 9, you're circumventing the filesystem security that prevents accidental deletion. os 9 doesn't care who that directory on your os x partition belongs to.. it just deletes it. i know you're doing it this way because this stuff is a little new and confusing.. but how are you gonna learn?
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 11:12 AM
 
Originally posted by furtheraway:
<STRONG>
by deleting from os 9, you're circumventing the filesystem security that prevents accidental deletion. os 9 doesn't care who that directory on your os x partition belongs to.. it just deletes it. i know you're doing it this way because this stuff is a little new and confusing.. but how are you gonna learn? </STRONG>

But nothing else is working so far and I know that the folder is just rubbish anyway. I don't even know why it is locked. No app is using it.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jan 16, 2002, 11:29 AM
 
Originally posted by KellyHogan:
<STRONG>

Interesting. I got a DOS-Unix translation guide for the basic stuff but I'm getting into this now. I haven't picked up any Unix utils yet, first I have to understand the CLI. But it's quite addictive.

The codec copied across fine but still doesn't work. Crap beta.</STRONG>
Come to think of it, what codec is this, that's making you modify hidden files on your system? Or are you not allowed to say?
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 12:49 PM
 
Originally posted by Millennium:
<STRONG>
Come to think of it, what codec is this, that's making you modify hidden files on your system? Or are you not allowed to say?</STRONG>
If I get it working I might be allowed to say.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Jan 16, 2002, 01:07 PM
 
My guess is, if this is a video codec that wants you to move something to /var, it's not compiled to work on OS X anyway.
[Wevah setPostCount:[Wevah postCount] + 1];
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 02:18 PM
 
Originally posted by Wevah:
<STRONG>My guess is, if this is a video codec that wants you to move something to /var, it's not compiled to work on OS X anyway.</STRONG>
It's a port from another Unix. Apparently on that Unix the codec had to be installed in var/flexlm and then modified with a text editor.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Jan 16, 2002, 03:37 PM
 
Well, like I said...it's just a guess...
[Wevah setPostCount:[Wevah postCount] + 1];
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 16, 2002, 03:53 PM
 
Originally posted by arn:
<STRONG>"rm -Rf &lt;dirname&gt;"

Note the capital R. </STRONG>
Just thought I'd mention, the capital "r" isn't necessary for the rm command. The flag "-R" and "-r" do the same thing for this specific command.

All flags are case sensitive. They only time (like in "rm") that case doesn't matter, is when the writer of the command put in the alias for the other case. Always check the man pages to see if case matters or not. The man page for rm, for example, lists both -R and -r and mentions that they do the same thing.
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 04:45 PM
 
Originally posted by KellyHogan:
<STRONG>

It's a port from another Unix. Apparently on that Unix the codec had to be installed in var/flexlm and then modified with a text editor.</STRONG>
Sorry, that was a license for the codec.
     
scottiB
Professional Poster
Join Date: Jan 2000
Location: Near Antietam Creek
Status: Offline
Reply With Quote
Jan 16, 2002, 04:51 PM
 
Yeah, I was about to say that

/var/flexlm

is the directory where we store the licenses--aw.dat (Maya and AutoStudio) on our SGIs.

[ 01-16-2002: Message edited by: scottiB ]
I am stupidest when I try to be funny.
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 05:05 PM
 
Originally posted by scottiB:
<STRONG>Yeah, I was about to say that

/var/flexlm

is the directory where we store the licenses--aw.dat (Maya and AutoStudio) on our SGIs.

[ 01-16-2002: Message edited by: scottiB ]</STRONG>
As you can see I coudn't tell the damn difference. Do you have any video codecs like a Cinepak codec in your flexlm directory?
     
seb2
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status: Offline
Reply With Quote
Jan 16, 2002, 06:00 PM
 
you're all right about terminal, i use this for pretty much anything, but there's still good ol' finder... choose "go to folder..." from the "go to" menu and type in "/var"... there you go.

is you want to delete lots of stuff, but you're not sure if there's anything among it that might still be useful (if, e.g. you use "rm *"), use the "-i" switch (can't use it with "f", because it explicitly means the opposite), makes it *i*nteractive and will ask about every file.

actually i alias rm, cp and mv to rm -i, cp -i and mv -i in my .bash_profile
     
KellyHogan  (op)
Banned
Join Date: Oct 2001
Location: The Breakaway Democratic Banana Republic of Jakichanistan.
Status: Offline
Reply With Quote
Jan 16, 2002, 06:27 PM
 
Originally posted by seb2:
<STRONG>you're all right about terminal, i use this for pretty much anything, but there's still good ol' finder... choose "go to folder..." from the "go to" menu and type in "/var"... there you go.
</STRONG>
Shit. You're right. Isn't that unsafe?
     
scottiB
Professional Poster
Join Date: Jan 2000
Location: Near Antietam Creek
Status: Offline
Reply With Quote
Jan 16, 2002, 07:12 PM
 
Do you have any video codecs like a Cinepak codec in your flexlm directory?
Nope. Purely license files (xxxx.dat) I'm unsure why you'd need to alter something in a flexlm license file--unless you'd need to alter or add a feature within the .dat file that would be unlocked with the license.

Our licenses are keyed to our SGI box's GETID number, fyi.

Here's a link to the flexlm app---note a division of Macrovision :-(
http://www.globetrotter.com/flexlm/flexlm.shtml

Sorry couldn't be more help.
I am stupidest when I try to be funny.
     
seb2
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status: Offline
Reply With Quote
Jan 16, 2002, 07:15 PM
 
Originally posted by KellyHogan:
<STRONG>Shit. You're right. Isn't that unsafe?</STRONG>
no, you still need sufficient privileges to edit, copy or remove stuff in/to/from there. but if you just want to have a look at stuff, it'll do and if you absolutely don't want to do stuff from the terminal, you could still login as root, really wouldn't recommend that, though.

by the way, you cannot directly edit most of the stuff in there, but by dragging it to some place you have write privileges for, the finder will copy it there for you, the files belong to you. (try opening "/etc", you could for example copy passwd to some place; it's only being used in single user mode, just for the records)

haven't used this in a while and don't know whether this still works after the security update, but this used to work in terminal:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>su
open -a TextEdit /etc/passwd</font>[/code]

just in case you don't like pico, emacs, vi and all the like. i like pico, though, used to use pine a lot.
     
   
 
Forum Links
Forum 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 On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:03 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,