0
votes
1answer
39 views

OSX Operation Not Permitted on Immutable flag

Anyone know super command for replacing locked .plist? I have locked desktop.plist (immutable flags) needs to replace with a new desktop.plist. Problem is unable to replace the existing .plist. I get ...
0
votes
1answer
60 views

Mac OSX: Terminal command to replicate activity monitor network data?

I've been googling around for a while now to try and find a terminal command which can output total kb/s IN and OUT for wifi (en0). The command cannot use sudo, so lsof is out. I've tried using ...
0
votes
0answers
30 views

Retrieving data from Disk Utility Image

I created an image of my mac using disk utility. It's a .dmg. It has a lot of data on it (about 1 TB) and I only want one file from it. Is there any way I can selectively pull information from it, ...
0
votes
1answer
31 views

Cancelling shutdown -h command on Mac

I usually use the command sudo shutdown -h +60 from the Terminal on my Mac. Although I'd like sometime to cancel the scheduled shutdown or postpone it. Is there a command to do so? If yes, how?
0
votes
2answers
98 views

How to inactivate network service by terminal on mac os x?

I google but found nothing helpful. the above link was useful when I wanted to create service of any other configuration commands on terminal but I found nothing about how to inactive a service by ...
0
votes
1answer
53 views

How do you access a removable device from the command line?

I have a file called list.txt on a USB stick that I want to edit using VI. I can't cd to the usb stick. It appears on the desktop as ESXI. When I run diskutil list it shows up as /dev/disk2 #: ...
1
vote
2answers
54 views

Batch output md5 with corresponding file name to text file

I'm trying to output to a text file a md5 checksum of each file in a folder in this specific format: checksumhash1 *NameOfFile1.ext checksumhash2 *NameOfFile2.ext checksumhash3 *NameOfFile3.ext ...
0
votes
0answers
49 views

cannot type at command prompt in mac single user mode

I am trying to run applejack. At the bong, I press the command + s keys. The prompt comes up, but when I type, nothing happens. I have a Mac USB keyboard attached and a dynex USB mouse. I tried ...
1
vote
0answers
41 views

du on Mac OS 10.9 gives two different answers for the same directory

If I run du on my iMovie Library.imovielibrary I can get two different results depending on how I run du. However, I believe both of these should result in the same value. Behold: davids-imac:Movies ...
0
votes
2answers
104 views

Is there a way to execute global hotkey using the command line?

OS: OS X 10.9.1 Mavericks Is it possible to execute any global hotkeys from the command line? For example, if I wanted to copy and paste, is there a command to let me type the exact hotkey and ...
1
vote
1answer
33 views

What file(s) does OS X store its version number in?

I've seen it before, but after a few minutes of Googling I'm coming up empty -- does anyone know/remember what file OS X stores its version number in? I'm trying to figure out the version of OS X on ...
0
votes
1answer
1k views

How to mount WebDav filesystem on Mac?

Trying to do the following: mkdir /Volumes/temp mount_webdav davs://myusername@webdav.yandex.ru:443 /Volumes/temp It doesn't return any error, but /Volumes/temp is empty in result. Here are the ...
0
votes
0answers
92 views

Can't generate gfx2gfx with pdflib

I'm trying to generate a command line tool called gfx2gfx using pdflib by following the instructions HERE, but whenever I try to run the prepare.sh file to compile the tool, I get the following error ...
0
votes
1answer
165 views

printing via commandline (CUPS) with photo printer

I'm having a problem printing a photo via commandline, using CUPS. Im using Mac(tried on Mountain Lion and Mavericks) and Canon Selphy CP900 photo printer. I have the correct drivers. From the ...
1
vote
1answer
53 views

Get Safari's current location from command-line?

How can I get the location of the current tab of the frontmost window of Safari in a shell script?
0
votes
1answer
273 views

How can I export / import a single keychain item via the command line in OS X?

OS X has a command line tool called security that is made for working with keychains. The man page has examples of how to export all items of a specific type / all items for a specific keychain - but ...
2
votes
1answer
197 views

Starting airplay from command line, to send output of 'Say' Mac OS X command to airplay

Ok, Sunday question :) Trying to make a little joke... 1) if you open a terminal, and type "say -a ?", Mac OS X will give you the list of devices it can send spoken words to. On mine, it says: 39 ...
2
votes
1answer
34 views

Mere existence of .bash_profile alters my PATH

On a mac when I open a terminal my PATH is: /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin Which includes some folders where mac port tools reside, but as soon as I ...
2
votes
3answers
98 views

How to sort a file with string lines by the number of a specific symbol in the line?

Say I have a large plaintext file with a string on every line. The string only consists of alphabetical characters, except for underscores _, which divide the strings in syllables. I want to sort ...
2
votes
3answers
40 views

Can't get rid of mysterious outdated git installation on OS X

I'm trying to update my git installation to the latest version. I'm having trouble getting rid of the old version, which the git command is still referencing: $ git --version git version 1.6.3.2 ...
0
votes
3answers
107 views

What causes commands to print on first line in Terminal.app on Mac OS X 10.8?

Every time I execute a command in Terminal.app, the command prints in the beginning of the first output line like this: > ls lsfile1 file2 file3 This only happens in Terminal.app, iTerm.app for ...
0
votes
0answers
241 views

Mac OSX 10.6.8 - System settings through command line

I would like to be able toggling the "Ignore embedded trackpad when a mouse or a trackpad is connected" in System preferences > Universal access > Mouse and trackpad from terminal, from the ...
0
votes
1answer
89 views

Turn off an iMac's screen in single user mode

I have an old (yet fairly powerful) iMac that I would like to be able to use for servers. Obviously, the best way to run a server would be to boot it up into single user mode/verbose mode for maximum ...
0
votes
3answers
129 views

Copy and paste UNIX executables to $PATH does not work?

Why is it when I copied the C compiler tools from the Xcode application folder to usr/bin (which is one of the $PATH for Mac OS X), Terminal doesn't seem to be able to see it? Running a find command ...
-2
votes
2answers
75 views

How do you create a folder using the command line? [closed]

How do you create a new folder / directory using the command line?
0
votes
1answer
217 views

Remapping all OSX shortcuts from cmd to ctrl

I am new to OSX, and since I have mapped CTRL to CapsLock, and use alt a lot, I dont need CMD, how to remap all shortcuts globally not to use CMD?
0
votes
1answer
354 views

dseditgroup not returning error but not removing user from group

I am following instructions written by someone else to harden an OS X box. One requirement is to made sure certain system-defined groups have no users in them. For this example I will use _ard, but ...
2
votes
0answers
61 views

Launching Sublime Text 2 on the command line doesn't result in opening the specified file

When I type subl ~/.profile I expect Sublime to open my .profile file. This works with some files, although I couldn't find a pattern to which files. Is this a bug in Sublime or have I done ...
1
vote
0answers
95 views

Bash Read All Characters [closed]

I need to be able to read every key that can be pressed with bash. This includes the arrow keys, esc, and the function keys. The command "read" is not going to work because some characters are more ...
0
votes
3answers
2k views

Find and replace string in a list of filenames

I have a couple of files like so, (on Mac OS X): product-103-footer.tpl product-103-header.tpl product-103.tpl I want to replace '103' in all the filenames with something else using grep and sed, ...
0
votes
1answer
54 views

Call a command line program in Terminal.app without leashing to the terminal? [duplicate]

Running a program with & appended is a handy way to run it as a background process, but the program is still leashed to the terminal; if you quit Terminal.app, the program ends. How can you start ...
-1
votes
1answer
50 views

Can terminal be used to find files on MBP? [closed]

Can terminal be used to find where Thunderbird keeps email files?
1
vote
0answers
89 views

Binding .inputrc on Mac?

On Linux I had this line on my .inputrc: "\C-/": undo which doesn't work on Mac. Is there a way to make it work? On another note, is there a way to bind command keys on inputrc?
2
votes
0answers
50 views

Using the heap command line tool

I am getting a crash while using libgmalloc and I get a complain which says something like Failed to VM allocate XYZ bytes Explicitly trapping into debugger!!! Now I when I encounter this ...
1
vote
0answers
47 views

Is it possible to make a stopped process survive a shutdown?

I know that a program can receive a STOP signal and just sit there until it receives a CONT signal. Now knowing exactly how this works, I'm curious whether whether there's any way to have a STOPped ...
1
vote
0answers
192 views

/usr/sbin/installer requires root, not Admin, to install a package

Prior to Mountain Lion, I was able to install packages with /usr/sbin/installer as an Admin user. However, with Mountain Lion, when I try running installer -pkg blah.pkg -target / I get the error ...
1
vote
1answer
565 views

How to specify batch (.command) file current location in Mac OS X

I have a batch file (.command) that I double click to do work. It has dependencies on files in the same folder, but if I double click the .command file it just launches and assumes the current ...
2
votes
1answer
832 views

How can I tell if the lock screen is active from the command line on OS X?

I have a cron script that I want to run regularly if I am logged into my Mac. I don't want it to run if the Lock Screen is up. Is there a way to check from the command line / Terminal if the Lock ...
1
vote
1answer
572 views

How to get user information Mac?

How would I get user information from a Mac such as user domain, etc. through a Terminal command? I've tried dscl as well as dscacheutil, but they don't really have what I'm looking for. I was ...
4
votes
2answers
1k views

Get Mac-Address in Single-User Mode in Mac OS X 10.8?

I was wondering if there is a way to get all the mac addresses of my network interfaces in single-user mode in OS X 10.8. I've tried ifconfig, but since single-user mode doesn't turn on networking, I ...
5
votes
3answers
30k views

Command Line SSH restart Mac OSX Mountain Lion

How can I restart the SSH service via the command line on Mac OSX Mountain Lion please? Using ps aux | grep 'ssh', I was able to deduce that the process is most likely /usr/sbin/sshd. From here I ...
6
votes
1answer
3k views

pfctl port forwarding in Mac osx?

-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 -A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8080 -A POSTROUTING -s 10.0.10.0/24 -o ...
1
vote
1answer
85 views

How do I show usernames in top?

I'd like to do something like top -o cpu but with usernames for each process shown in each row. How can I do this? Thanks! p.s. I am on Mac OS. I am not sure if the top command is different from ...
3
votes
1answer
614 views

Can I manpulate Little Snitch access control lists via CLI on Mac OS X?

I am running Little Snitch on Mac OS X, which lets me control how individual processes access the network. Currently, every time a new application tries to go online, I have to confirm or deny its ...
1
vote
0answers
57 views

Unable to apply quota to a group with ACL persmissiions on MAC OS X SL Server

I am trying to apply quota to a group using edquota to a group I created through workgroup manager, but the group does not appear in repquota -a -g command. It appears that quota apply to only groups ...
0
votes
1answer
241 views

Use multiple DNS based on request host/IP

Is it possible to use different DNS servers based on the ip or the requested hostname? For example: for www.example.com the 8.8.8.8 DNS server should be used for any other request the 192.168.1.1 ...
17
votes
2answers
10k views

How can I get the current screen resolution from the command line on OS X?

How can I get the current display resolution from the command line in OS X?
5
votes
2answers
5k views

Enable SSH on a Mac in single user mode

I have an iMac that I can access only in single user mode, because of serious hardware damage. I attached to it another computer with an Ethernet cable. I would like to login remotely to the iMac ...
0
votes
3answers
439 views

Mac OSX Terminal different colors

Is there a way for the command line and the output to be in different colors? For example, I've been playing with the PS1 value so my prompt is in red, but I'd like to have the command line in green ...
4
votes
2answers
3k views

is there a linux equivalent of iTerm(mac) sending command to multiple tabs functionality?

in iTerm, you can send a command to execute simultaneously on a set of already opened tabs. Is there a way to do this in linux (with gnome-terminal preferably)? for instance, supposed that I had 10 ...