Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 16, 2013, 07:51 AM   #1
nelly22
macrumors member
 
Join Date: Sep 2009
Path to virtual memory folder?

Is there any way in AppleScript/Unix to get path to virtual memory folder (/private/var/vm), similar way than (path to desktop)?

We have many Macs and some Macs keep virtual memory in non standard place.
nelly22 is offline   0 Reply With Quote
Old Mar 16, 2013, 03:51 PM   #2
cqexbesd
macrumors member
 
Join Date: Jun 2009
Code:
ps -axo command | awk '$1 == "/sbin/dynamic_pager" { print $3 }'
or maybe

Code:
xpath "/plist/dict/key[text()='ProgramArguments']/following::array/string[3]/text()" < /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
Neither are terribly robust but depending on your needs might do.
cqexbesd is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:51 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC