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)

1
vote
1answer
6 views

Resizing the terminal window for ipython command prompt

I am using the OS X Terminal (I know, not Linux or Unix, but hopefully that's irrelevant here) for a number of operations, and commonly use nano to quickly edit files. In doing so I often resize the ...
2
votes
1answer
32 views

Split shell horizontally to show ls -al and pwd

I use zsh as my default shell on OSX. I would like for my shell to always have a horizontal split showing pwd and ls of the current directory I'm in. How do I go about it ?
4
votes
2answers
178 views

Man page quotation characters [duplicate]

I've just been looking through a few man pages for a few different commands including grep and ifconfig. I've noticed over a few pages, the content uses a strange syntax to notate what i think are ...
6
votes
1answer
60 views

Terminal does not accept pasted or typed lines of more than 1024 characters [duplicate]

When I enter text on stdin in an OS X Terminal, a single line is limited to 1024 characters. For example, cat > /dev/null beeps after I type (or paste) a line longer than this, and refuses to ...
3
votes
2answers
175 views

How can I import new Unix commands on my OS X Terminal?

There are a number of Unix commands which do not work on my OS X Yosemite 10.10.3, Terminal Version 2.5.3. For instance, I often use this cheatsheet of Unix commands: ...
2
votes
0answers
29 views

Identify process

Every couple of minutes my Mac OSX machine starts running a process that consumes 10% of the CPU. It runs for a couple of seconds and then stops. I can see the process coming up in 'Top', but the name ...
1
vote
0answers
15 views

Lsyncd not working on Mac 10.9

I'm attempting to use lsyncd to automatically move files to my local development server. My host is OSX 10.9. SSH on the server works. I can connect using ssh from the host. I am using an SSH key to ...
1
vote
0answers
32 views

does vi have a bug which changes spaces in unedited lines, or is there an option to turn this “feature” off?

I changed a file by just adding a few lines, then ran a git diff and found changes strewn throughout the file resembling as shown in the image above: an extra space at the end of a line in the ...
0
votes
1answer
11 views

Dual-boot Mint on OS X: is OS X Startup Manager not suitable to boot Mint partition?

I am thinking of dual-booting Linux Mint on Mac OS X, and for that reason I was reading a tutorial about it (http://community.linuxmint.com/tutorial/view/1643). After Mint's installation the tutorial ...
3
votes
1answer
90 views

Unix command equivalent for OS X Finder's Duplicate Exactly

What command can reproduce this function in bash? In Finder select File then press ⇧⌥ to make the command visible (⇧⌥⌘D). In AppleScript it's available as tell application "Finder" to duplicate ...
3
votes
1answer
33 views

How do I check if sound card is in use and, if possible, which process is using it?

I want to know if a program is using my sound card without my knowledge. I thought about building a program that uses low-level device driver code to do the trick, but am now interested in seeing if I ...
1
vote
1answer
14 views

Installer thinks there's an installation in progress on OS X

Every time I log off on my user account, an Installer prompt comes up asking "Are you sure you want to abort the installation?" and the options are Abort or Cancel. I am absolutely certain that ...
1
vote
1answer
25 views

What happens if I move the hard drives used by Rsync to another computer, and keep syncing them with it?

I realise the question is confusing, so allow me to elaborate. I apologise for the phrasing, as I wasn't sure how to put it. Here's the scenario: As my backup, currently my Mac launches Rsync every ...
2
votes
1answer
20 views

How to configure Alpine to use an alternate editor on Mac OS X?

I'm considering using Alpine on OS X (Yosemite). I have most things configured, but I want to be able to use a GUI text editor (specifically OS X's TextEdit) as the Alpine alternative editor, so that ...
0
votes
1answer
21 views

virtualbox on os x lags when not active

I am running ubuntu server as guest inside virtualbox on os x 10.10.x host While the system works, it lags whenever the virtualbox window is not the active app. E.g. I log into ubuntu from terminal ...
0
votes
3answers
56 views

Removing line-breaks, whitespaces and tabs from every file

Say I have a folder with 10K text files. I would like to remove every space, TAB and linebreak from each file. How can I do this efficiently?
0
votes
1answer
188 views

How can I delete files on a read-only file system?

I have an encrypted .dmg file with some useless files that I need to delete to make space. How can I delete them without having to convert them into a read write system and then back? (Would take 4~5 ...
0
votes
0answers
24 views

Repair/fix HFS+ partition (“Invalid B-tree node size”)

salam I need help with a 800GB partition. I accidentally deleted my partition with diskutility, but it says something like "Error that disk in not good". I already tried Testdisk; it finds my ...
1
vote
1answer
33 views

Using git over sshfs on OSX

Due to a new job, I'm switching from working on Ubuntu 14.04 to OSX Yosemite. I mainly work in R, and I was using RStudio and git to manage my code on a server (Debian). To this I mounted the server ...
0
votes
0answers
31 views

can I boot ext4 usb stick with xubuntu on from a Mac laptop?

is there a way to boot my ext4 formatted "xubuntu" USB memory stick from a Mac laptop? The laptop can identify FAT32 usb memory sticks with ubuntu at boot time, but it cannot identify mine, which is ...
4
votes
0answers
44 views

rm -rf ~/.Trash/* doesn't work, Mail Attachment.eml:OECustomProperty unable remove

I'm on OSX10.10.3, I've had a file in my trash for about 6 months or so. I have a file in my trash, 2 actually. That are from my mail cache that I dumped since I don't have the space on my SSD for my ...
1
vote
1answer
98 views

Is there a canonical method to restrict ssh access to certain IP addresses in Unix?

I checked man pages related to ssh on OS X and other systems and tried using hosts.allow and hosts.deny files as per this post, and sshd_config to no avail. $ cat /etc/hosts.allow sshd: ...
0
votes
0answers
38 views

Using brew: curl version error, “Incompatible library version” for libcurl.4.dylib

I used to have a working version of homebrew but then something broke today related to curl and libcurl.4.dylib— possibly a version or file location issue. I'm on Mac OS X 10.9.5 (Mavericks). For ...
1
vote
0answers
22 views

Installing homebrew - dangerous permission changes?

I'd like to install homebrew, but when I start it up, I get this message: ==> The following directories will have their group set to admin: /usr/local/. /usr/local/include /usr/local/lib Seems ...
1
vote
1answer
23 views

OSX: MBP: How does system detect sd card inserted?

I have a MacBookPro running Mavericks. I can insert one sd card into the slot and it mounts just fine. Another sd card I slip in and nothing happens. It does not appear in disk utility. It does ...
1
vote
0answers
34 views

Why can't Adobe Flash for Mac run on Linux?

As we know, Adobe no longer develops new Flash versions for Linux (except for Google Chrome, i know). It does, however, develop actively Flash for Windows and Mac. Linux can run native Windows ...
0
votes
0answers
45 views

connecting to virtualbox ubuntu from osx extremly slow

I am running ubuntu 10.04.x as guest on virtualbox from osx x 10.10.x host It works (kind of), but after working a while with it and also after power sleep it can get almost unusable slow. It looks ...
4
votes
1answer
442 views

Can I write C programs for Linux on OS X?

In case I'm writing a program (of any kind) in C, that is meant to be run on Linux environment, can I write it under OS X? (concurrency wise for example) I'm asking this because I like programming in ...
1
vote
1answer
47 views

Operation not permitted

I'm on OS X and I'm trying to write an interface for for an interpreter, the communication with the interpreter looks like this in PHP: $f = fopen('mmascript.m', 'w'); fwrite($f, ...
4
votes
0answers
61 views

Disable networking only inside of a single terminal

I want to run a command in the terminal to disable networking, just in that terminal. How can that be accomplished? I'm running OSX. Note: I only want to disable the networking in that terminal. ...
2
votes
1answer
32 views

Cannot edit sudoers file - Cannot execute sudo

I cannot currently use sudo. I also cannot edit the etc/sudoers file because sudo does not recognize me. $ whomai myusername $ sudo visudo Password: myusername is not in the sudoers file. This ...
0
votes
1answer
24 views

find returns weird file order on RHEL but not on OSX [duplicate]

When I enter find . -iname "[0-9]*.nii" on my OSX machine it returns: ./03_Rest_fcMRI/9793_01_03_1.nii ./04_VEMP/9793_01_04_1.nii ./04_VEMP/9793_01_04_2.nii ./05_Tapping/9793_01_05_1.nii ...
1
vote
1answer
16 views

How to have tmux on startup for both OSX and Ubuntu (including Quake)

I recently updated my Ubuntu 14 system and the update has made it impossible to have tmux started up automatically. In fact the previous setting made it impossible to log into my Ubuntu account(!), ...
0
votes
1answer
21 views

printenv.wsf and printenv.vbs in /Library/WebServer/CGI-Executables

Please don't shoot this one down, as I looked through my Macbook Air and wanted to configure my Apache installation to more specific needs, I came across printenv.wsf and printenv.vbs, which I find ...
2
votes
1answer
37 views

Installing Linux with USB on Mac

I am trying to get Ubuntu (version 14 I believe. It's the latest version) installed on my Macbook Pro (Late 2013 edition 13 inch, no disk drive in it) via a USB Flashdrive. I have followed every ...
2
votes
1answer
85 views

Best way to connect to an existing user context through SSH

What we would like to do: We have short living virtual machines for running scripts. The virtual machines are used through SSH to perform "builds" (sequence of scripts) and discarded once all the ...
1
vote
1answer
20 views

How do I get the Truecrypt CLI installed?

I have a unix machine with truecrypt 7.1a installed. I'm trying to mount a volume to test with the command line but I don't have the truecrypt command installed evidently. Did the command line ...
5
votes
1answer
118 views

Edited sudoers file with text editor - now can't run sudo

I now know that I should never try to edit the etc/sudoers file with a regular text editor. However, minutes before I learned this, I saved a new user name in the file with Sublime Text. Now when I ...
3
votes
2answers
113 views

sed: inserting text before end of <HEAD> section

I need to insert some text into an HTML file before the end of the HEAD section. I'm trying: sed -i "s#</head>#<style> @page { prince-shrink-to-fit: auto } ...
2
votes
3answers
235 views

Why root does not source .bash_profile?

Everytime I try to login as root using su (not su -), it doesn't source .bash_profile in user1's home directory. Basically my /var/root directory doesn't have .bash_profile, so I put a copy of ...
1
vote
2answers
89 views

Mac Terminal - rename *.png.png to *.png

I have a bunch of images that I'd like to rename as follows: *.png.png --> *.png *.jpeg.jpg --> *.jpg *.JPEG --> *.jpg The only thing I've tried thus far is mv *.png.png *.png, but I knew ...
0
votes
0answers
48 views

Swap OS X Command/Control keys without changing bash shortcuts

I originally asked this on Ask Different, but I think since my issue is probably more with bash this would be a more appropriate site. First of all, I know that you can use the System Preferences to ...
0
votes
0answers
39 views

csvkit Permission denied

I am on Mac and installed csvkit. When I run csvlook, I get a traceback with the following error message: IOError: [Errno 13] Permission denied: '/Library ...
1
vote
3answers
145 views

Shell expansion for arguments?

For example: mkdir ~/{1,2,3} Creates directories ~/1, ~/2, and ~/3. It equates to: mkdir ~/1 mkdir ~/2 mrdir ~/3 But, using the same syntax in the case of CMD < argument > : brew {install, ...
0
votes
0answers
61 views

Process Being Killed due to low swap

I'm running a python (2.7) script on mac osx yosemite. The script is fairly computationally intensive, certainly bumping up against my machine's RAM limitations. The computer crashes and restarts ...
2
votes
0answers
42 views

Catch/diagnose user process being killed - Inexplicably logged out automatically

Context: I'm using bash in Mac OSX Yosemite. Problem: I'm executing a (python) script that I expect to use alot of resources and take a few hours to run, redirecting stdout and stderr to a log file. ...
3
votes
0answers
32 views

Content of root's home directory in OSX

What is stored in root's home directory on OSX? What happens if you delete it on accident? Heres whats in my current root home folder. OSX:~ root# ls -lash total 8 0 drwxr-x--- 5 root wheel ...
0
votes
0answers
58 views

Running Mac OS X under KVM/QEMU

Note to be removed in the future, so as to avoid confusion from answerers and mods edit: Forgot to add in the note, if anyone thinks this is the wrong stack-site to post this, please comment on why, ...
0
votes
1answer
37 views

Sed a plist file gives a iilegal byte sequence

With a Unix Mac 10.9.5, French CA version I've read a lot of tips but if the error is gone, the plist is corrupted. the locale command gives: LANG="fr_CA" LC_COLLATE="fr_CA" LC_CTYPE="fr_CA.UTF-8" ...
2
votes
0answers
72 views

Where does BPF packet capture read its data from?

I am interested in the low-level interfacing with network packets. From what I read, tools like tcpdump and libpcap use the BPF packet filter device /dev/bpf* to read link-layer network packets (on ...