Questions about the command line and other Unix-like aspects of Mac OS X, including the Mach/BSD-based kernel and FreeBSD-based userland. You may want to consider using Ask Different instead.

learn more… | top users | synonyms (1)

7
votes
3answers
2k views

Grep_color on mac

I am trying to get my regex highlighted on mac using terminal. I have put this is my .profile: export GREP_COLOR='1;30;40' Nothing changes, so I added the same to my bash.profile still nothing, ...
4
votes
5answers
786 views

If Mac OS X is UNIX, why is it that it is not open sourced and the license is proprietary?

If Mac OS X is a Unix, as answered in this question, why is it that it is not open sourced and the license is proprietary, as stated in this Wikipedia article? According the the genealogy from this ...
3
votes
1answer
2k views

How do I make all current and future files in a directory readable by a certain group/user?

I have a "Drop Box" directory for students to submit assignments. Its permissions are set to "drwx-wx---" where all of the students belong to the group. This lets them write to but not read from the ...
0
votes
2answers
254 views

why does grep -A n give more lines than n?

I am verifying UID/GID for certain users using the dscacheutil command. Using grep with -A flag gives me what I need but the number of lines doesn't make sense. Output below: Edit8:~ edit08$ ...
1
vote
1answer
203 views

lpstat and localization under Mac OS X

How to force "lpstat" utility to show output messages in English under localized Mac OS X (version 10.6)? Example: lpstat -v Shows in Dutch: apparaat voor Samsung_SCX_4300_Series: usb://..... I ...
1
vote
0answers
218 views

How to specify command line options for XAMPP for Mac?

Per the answer to this question: Can I have conditional statements, based on server, in .htaccess file? I want to specify a command-line option when starting up Apache on my Mac. But my Apache is ...
0
votes
1answer
150 views

Python set up on mac

My /usr/bin contains the following installs of python lrwxr-xr-x 1 root wheel 76 Nov 18 06:17 pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7 ...
3
votes
1answer
68 views

Is there a way to integrate the unix “man pages” into OSX's Dictionary app?

I was thinking it would be cool to be able to look things up in the man pages the same way one looks up words with the "Dictionary" app. Is there a way to add the man pages that OSX supplies into ...
1
vote
1answer
620 views

How do I create a local copy of a complete website section from OSX using curl?

I'm trying to download Mathematics of the Discrete Fourier Transform so that I can read through it off-line on my iPad (which doesn't have an Internet connection) I have used wget in Linux. It seems ...
1
vote
1answer
1k views

How to have CoreAudio from Mac to Linux/Unix?

After using Alsa and PulseAudio for a while, I feel they are not yet strong enough for Audio capture and audio playback. When I test with loud-speaker and microphone, there is self feedback-loop. ...
0
votes
1answer
435 views

Setting LS_COLORS and in a GNU Screen

Is there a way to set a GNU Screen LS_COLORS to that of the default non-screen terminal window? Is there .screenrc or .screen_profile, I don't understand what happens when a GNU Screen is ...
3
votes
3answers
614 views

Command line friendly virtual machine

I've been using Virtualbox for a while now, but the only way I've learned to interact with it is through the graphical interface. Is there a way for me to send bash commands to the vm through the ...
2
votes
1answer
438 views

How do I build Lynx with SSL on Mac OS X?

I'd like to build and install Lynx on Mac OS X. I've found out that building is as simple as running ./configure, but I'm having trouble building with SSL support. I've downloaded openSSL. How do I ...
4
votes
1answer
471 views

Icon not showing in applications on OSX

I just re-installed Firefox, but the thumbnail is not showing in the dock applications folder. The icon DOES show both in dock and in finder. I have tried to re-install Firefox again but without ...
4
votes
1answer
721 views

Can you perform system calls from OSX Terminal?

So I get system calls in the context of a C program, but my textbook doesn't really address making system calls in Terminal (on Mac OSX). Can you do these on the command line like with "commands", or ...
3
votes
3answers
2k views

In Mac OS X Snow Leopard, how can one file's permissions be matched to another?

I need to make the permissions of a file exactly match the permissions of another file in OS X 10.6. I don't see 'getfacl' or 'setfacl' as suggested in some other posts for Linux. And, it doesn't ...
2
votes
1answer
326 views

libfaketime and Mac OS, LD_PRELOAD

Running Mac OS 10.7.2 and trying to run libfaketime and nothing happen. I installed and ran exactly as directed only the time and date stay exactly as are set in the system? Is anyone else able to ...
4
votes
1answer
191 views

Running an application with alternate/modified system time

I am looking for a way to start an application with an alternate system time than that which is set. Basically one of the beta programs I use has a bug (it really is a bug) that no longer lets it ...
0
votes
3answers
2k views

How do I cp the folder, not just the folder content?

Let's say I have folder structure like this: /parentFolder/ folder1/ folder1.1/ file1 folder2/ file2 How do I copy folder2 inside folder1.1 so that file2 is also in ...
11
votes
3answers
3k views

Fix or alternative for mktemp in OS X

I'm looking at a bash script someone else wrote that uses mktemp: TEMP=`mktemp --directory` However, this line does not work on my machine (OS X 10.6). How would I fix this line so that it is ...
2
votes
1answer
456 views

Input a list of files & directories to be copied with ditto

I have a short list of files and directories of which I would like to make a flat copy of using ditto in a bash shell. There are approximately 8-10 files and/or directories that need to be copied. I ...
2
votes
1answer
2k views

Creating symbolic links to applications in Mac OS X

I installed Aquamacs in a fresh OS X desktop, and wanted to be able to call the program from the commandline. Calling the file inside the app seems to work just fine: Amoss-iMac:bin amosjyng$ ...
2
votes
1answer
2k views

How to verify if tmux is properly installed on Mac OSX

I've just tried installing tmux from source (via installing libevent first). The installation seemed fine, without throwing any obvious error. But when I typed tmux in iTerm2, it returned "command not ...
3
votes
1answer
2k views

Sound volume control does not work in Ubuntu

My sound volume control does not work when I'm logged in with my regular user, though the sound works correctly. What's weirder is that the sound control works when I'm logged in as guest. With my ...
14
votes
4answers
13k views

How can I install the `ll` command on Mac OS X?

I'm using Mac OS X. When I SSH into servers I find the ll command useful, but it's not available on my local machine. How can I install it?
1
vote
2answers
83 views

How can I install programming tools in the root directory so that they can be used by non-admin users?

I'm running OS X and for security reasons my main account does not have admin privileges. How can I install development tools in the root directory so that they can be used by all users? If this can't ...
1
vote
0answers
2k views

xfce swap command and control keys

What is the equivalent of this in Debian XFCE?: Go into System -> Preferences -> Keyboard Click on the "Layouts" tab and then click the "Layout Options" button. Click on "Alt/Win key ...
3
votes
2answers
2k views

Why isn't my environment variable visible from the command line?

I'm trying to run the James SMTP server on Lion (Mac OS X 10.7.2). When I do this: sudo JAVA_HOME=/Library/Java/Home ./james-2.3.2/bin/run.sh it works fine. However, I'd like to make JAVA_HOME an ...
2
votes
1answer
521 views

Create bootable ubuntu usb for mac, or any pc

I've used Ubuntu live and the start up disk creator tool to create a bootable usb with ubuntu. I used the start up disk tool and I first clicked erase, to clear the contents of the usb, and then ...
8
votes
1answer
8k views

lsof and listening ports

I am trying to get all the processes listening for a network connection on Mac OS X. netstat does not have the -p option and I am trying with lsof lsof -i -sTCP:LISTEN gives me a fair list of ...
13
votes
6answers
2k views

Is there a root password on OS X and Ubuntu?

When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu user is created. The ...
3
votes
1answer
195 views

Restricting access to files on an external drive

I was wondering how to restrict access to a specific drive in Unix on the Mac. I was thinking to do this in Terminal where I create a file like this mkfile 6k secure_access. And where secure_access ...
7
votes
1answer
695 views

Screen cuts off beginning of long command when accessed through bash history

I'm using the default versions of bash and screen in OS X Lion. When I'm in a screen session and I scroll back through the bash history and I come to a command that is long enough to wrap. I might ...
0
votes
4answers
581 views

NMAP probing VirtualBox Client

Cannot seem to probe virtual guests from the virtual host. These guests can be probed from other devices on the same LAN/Network, but not the host. I can understand why it might be struggling, but I ...
2
votes
2answers
1k views

sv_SE.UTF-8 Problems with Bash and VIM in iTerm2

Two specific issues, despite me running iconv -f iso-8859-15 on my old files when converting from sv_SE.iso8859-15 to sv_SE.utf-8 I still get distorted characters. And I believe it's because of Vim ...
7
votes
2answers
414 views

Does OS X have its own line format?

Obviously there are at least two newline types: DOS and Unix. But does OS X have its own plaintext 'format'? I opened a text file in nano and was surprised to see: [ Read 26793 lines (Converted from ...
4
votes
1answer
1k views

Printing the current date/time with sub-second precision

GNU date(1) understands the %N format spec, which outputs nanoseconds, so: $ date +%H:%M:%S.%N outputs 19:10:03.725196000 BSD date doesn't understand %N. How can I print the current time with ...
7
votes
2answers
693 views

How to use the SVN CLI effectively

How can I make myself more productive with the SVN CLI? I need to complete repetitive tasks like these: find modified files in directory commit only SOME of them selecting them somehow other then ...
5
votes
2answers
3k views

Spaces as line breaks from inline for loop command

Someone care to enlighten me as to why the spaces in the first command seem to be interpreted as line breaks? Also occurs substituting print for echo. $for l in $( find *.txt -exec head -1 {} \; ); ...
1
vote
0answers
102 views

Why does cd // work? [duplicate]

Possible Duplicate: unix, difference between path starting with '/' and '//' On my Mac OS X Lion box, with Bash: $ cd // $ pwd // $ ls Applications System cores ...
10
votes
3answers
3k views

How can I determine the fs type of my current working directory?

I need a platform-independent and lightweight way of detecting the mount type of my CWD. Specifically, I need to determine if my CWD is in an SSHFS, NFS, CIFS, SMB, or local block store mount. I need ...
5
votes
1answer
536 views

How can I search/browse in some process's memory?

I'm using MacOS X 10.7 and I'm not very familiar with unix. Is there a command for a search in some process's memory for a string?
5
votes
1answer
370 views

DTrace to trap any chmod applied to certain files

Underneath the Mac OS X directory /audit I have certain files which users can access and chmod to their liking. I need to audit any chmod done on any files by recording the time, user and file being ...
8
votes
3answers
2k views

Directory size calculation difference

I need to get the size of directory in terminal for signing purposes. I'm using following command: du -s /path/to/dir I'm multiplying the result by traditional UNIX block size (512 bytes) and get ...
7
votes
1answer
3k views

Setting vim filetype with modeline not working as expected

As per the accepted answer to this question, I'm attempting to use modelines in vim to force filetype detection in some files. For example, at the top of a file named gitconfig (note there is no ...
1
vote
1answer
57 views

Have to type out whole path in order to execute an application in OSX [duplicate]

Possible Duplicate: How to run my own program without specifying its path One of the applications that I want to use came in a tar.gz, and I unzipped it into my home directory. Well, in ...
4
votes
2answers
1k views

Tell if a folder/file is hidden in Mac OS X

I know you can set or unset the hidden flag of a folder/file by doing chflags hidden foo.txt and chflags nohidden foo.txt. But is there anyway of telling whether the folder/file is currently hidden ...
2
votes
1answer
65 views

Creating Directories: with Permissions

I need to create a directory that is RW to all users using chown. what arguments should I pass chown to get a file with those permissions? Or maybe there is an even better way to do it......
9
votes
1answer
5k views

Why the value of VSIZE in top is different from the value of VSZ (Virtual set size) in ps?

I know VSZ in ps is for the total address space allocated for the app and is sometimes aliased as vsize (mentioned in man page of ps on linux), but what's the definition of VSIZE in top? This top ...
9
votes
4answers
5k views

If I connect a physical device, how can I ever know which device file belongs to it?

Say I plug in several USB drives which don't get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example? I'm running Mac OS X but ...