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)

0
votes
0answers
5 views

Audio File Search, Count and Sort - OS X or Synology

There is a collection of audio files on a Synology NAS. Approximately 24,000 albums worth, that I need to analyse and report on. I will need to: Count total number of files Count types of files ...
3
votes
1answer
14 views

Round-tripping text through zip, unzip fails with 'extra bytes' error. On Mac OS X 10.10 [duplicate]

I'm trying to zip streaming text, and unzip it later. A minimal example is: echo "Hey, could you zip this for me?" | zip hello.zip - ; unzip -p hello.zip This fails, with following output. warning ...
3
votes
1answer
23 views

How to prevent swapping on Mac OS X?

I am inclined to run Tails through a virtual machine so that I could chain two VPNs. One running through the host Mac osx and one more running from inside the virtual machine that's running Tails. ...
0
votes
0answers
15 views

open(1) in rifle.conf for ranger on OS X

ranger ~/.config/ranger/rifle.conf For simplicity What one line – in the rifle configuration file – could cause open(1) to be used for all types of file? Background ...
0
votes
1answer
702 views

Increasing `ulimit -u` settings temporarily in OSX Yosemite

I'm trying to temporarily (without restarting the machine, just for test that starts a JVM) increase the number of processes to 2048 in OSX Yosemite but I'm unable to do so. First, I tried calling ...
2
votes
3answers
55 views

Get Name of Computer Cross-platform?

I'm creating a login message for my computer inside of /etc/bashrc and would like to greet them to the computer with the computer's name showing. Here's my code: # (system stuff here) echo "Welcome, ...
14
votes
2answers
14k 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 ...
6
votes
2answers
4k views

Does Windows recognize Linux's symbolic links?

I was just wondering how a Windows system handles symbolic links. My best guess is that it will not recognize them, but I'm not entirely sure. Also, what do Macs do when confronted by one?
0
votes
1answer
17 views

X11Fowarding not working on Arch Linux ARM

I am trying to setup X11Forwarding between my Arch Linux ARM server and my OSX computer. I am accessing the server locally (always). /etc/ssh/ssh_config: X11Forwarding yes AddressFamily any ...
1
vote
0answers
10 views

How and when is keyboard data encoded from keyboard to application? [duplicate]

I hope this is not the wrong place to ask this, if it is, please point me in the right direction. As the title says, how and when is keyboard data encoded? I just wanna know in basic terms the ...
1
vote
2answers
32 views

Insert multi lines after match using Mac's sed command

I have 2 files:- a.xml <project> <modelVersion>4.0.0</modelVersion> <parent> ... </parent> </project> b.xml <project> ...
-1
votes
2answers
47 views

Find file, Edit text within files

Im trying to find a file then edit the text within these files. This is what I have so far, but sadly Im not that well versed... Help Please? grep -rl "wrongtext" ~/Library/Calendars ...
0
votes
0answers
10 views

Ubuntu 14.04 VM resizing in VMWare fusion 7 whenever a terminal is opened?

On a computer at work, we have a virtual machine running that resizes the whole VMWare window whenever you launch a new CLI terminal window within the VM. Any ideas how to fix it? It's quite annoying. ...
21
votes
5answers
18k views

Open a RPM on a Mac?

I am on a MacBook Pro running Apple Leopard (Mac OS X 10.5.8). I would like to unpackage a RPM and view the files contained within the wget-1.11.4-2.el5_4.1.src.rpm . I don't need to install the ...
3
votes
3answers
152 views

For some IPs, ping -c 4 -W 1 ip | cat does not output anything until ping has finished, whereas it does for others

Why do $ ping -c 4 -W 1 127.0.0.1 | cat and $ ping -c 4 -W 1 1.1.1.1 print their output immediately, whereas $ ping -c 4 -W 1 1.1.1.1 | cat prints nothing for four seconds, then prints all ...
5
votes
1answer
219 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 ...
1
vote
1answer
26 views

Installed PDFInfo with Homebrew Cask but no command associated with “pdfinfo”

First, please excuse this very basic question. I'm sorry I have to ask it, but it's very difficult to find your way around the shell at the beginning. I installed pdfinfo with Homebrew Cask: brew ...
1
vote
0answers
23 views

Using curl results in error: “Library not loaded: /usr/local/lib/libcurl.4.dylib …”

I had a few issues with the cURL library interfering with Homebrew. After hopefully removing the library (I no longer use it anyway), I started receiving errors whenever I used commands such as curl ...
12
votes
4answers
6k views

Why can't tr read from /dev/urandom on OSX?

A colleague suggested creating a random key via the following command: tr -dc A-Za-z0-9_\!\@\#\$\%\^\&\*\(\)-+= < /dev/urandom | head -c 32 | xargs It gave me the error: tr: Illegal byte ...
4
votes
3answers
120 views

How to copy recursively and change file names to be unique

I have a large tree containing a lot of photos on an external drive that was formatted with one of the linux filesystem types (don't remember which one). It's mounted on my mac and I'm trying to copy ...
2
votes
2answers
70 views

How can I setup a separate bash environment with only GNU utilities on OS X?

For the last 5 years, I have used linux as my everyday OS for performing scientific computing. My work recently gave me a Mac that I will be the primary user for the next few months. I keep running ...
0
votes
0answers
42 views

Remote X11 applications have wrong keyboard mappings (local: OSX, remote: Linux)

I am connecting from a Mac (with OSX 10.6) to a Linux machine (with CentOS 6.6) by using the ssh command (ssh -X). On the Mac side, I am using the Terminal app. After logging into Linux, I can use ...
0
votes
1answer
25 views

How to send a NDP message?

I would like to send a NDP ( Neighbor Discovery Protocol ) message from my Mac on the network to discover which device is available or not. How can I do this ?
1
vote
1answer
791 views

MacOS X Mavericks running VirtualBox cannot communicate with Linux VM

I have a MacOS X Mavericks host running Vagrant using VirtualBox as a provider. I have experienced several times that with different VMs (particularly Ubuntu Linux VMs) after the first time the VM is ...
2
votes
1answer
42 views

rsync over SSH sometimes very slow--other times maxes out bandwidth

I have a bash script set up on computer A (Mac OS X) set to run every five minutes via a cronjob. This script checks for new files on remote computer B (Gentoo Linux) then rsyncs any new files to ...
0
votes
1answer
13 views

Bind tmux prefix to section symbol §

I usually use the backtick key as my prefix, but this keyboard has the section/stanza symbol § where the backtick usually (at least, for me in the UK) is. If I bind to this key, quoted or unquoted, ...
0
votes
1answer
89 views

“dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib” while executing curl with a unprivileged user

My MAC OS is Yosemite 10.10, which has an old version of curl. I have installed Xcode and Xcode command line tools. I run cURL with the "sudo" command as “sudo curl”: sudo curl Password: ...
2
votes
1answer
29 views

using dd command for folder, but deleted items don't seem deleted [closed]

here is the image I used dd command to create a new floppy. First I tried it with a folder filled with naber.bin, test.bin, blabla.bin and boot.bin. And then i deleted all except boot.bin. ls -a ...
1
vote
1answer
693 views

VPN Setup Errors

I'm trying to install a VPN on one of our servers for use within my campus so that we can play some games, but I appear to be getting errors when I try to connect, as shown below. Not quite sure about ...
0
votes
0answers
29 views

How do I move files from a disk image using Terminal.

I downloaded an application (LaTeXiT) that installed itself as a disk image. I navigated to /Volumes and into the disk image, but when I try to move the contents to my /Applications folder, it returns ...
0
votes
0answers
49 views

Dual Booting - MAC OSX

I'm new to the whole Linux OS and want to use a distro called "Parrot Security" Problem is, I have a Mac Laptop to which I want to dual boot from. I've installed reFINd and tried to boot from a ...
1
vote
2answers
845 views

Linux guest VM on mac host - Keyboard

I use a Mac as a development box, but am slowly transitioning to Linux. So I am spending the majority of my time in the Linux guest VM while working. But I still spend a fair amount of time in Mac ...
1
vote
1answer
23 views

To recover OSX data in Debian

I have had taken backups by TimeMachine and now my Macbook Air 2013-mid finally died so I have to rescue files in Debian 8.1. However, it seems that no backups of so directories have been taken. I ...
0
votes
3answers
74 views
5
votes
2answers
2k views

Negative arguments to head / tail

Variants of this question have certainly been asked several times in different places, but I am trying to remove the last M lines from a file without luck. The second most voted answer in this ...
3
votes
1answer
56 views

Deleting ghost files with non-ASCII characters

I have some weird files and folders in my trash on Mac OS X. After I "empty" the trash, the files still remain. I attempted to manually delete the files: $ cd ...
7
votes
4answers
368 views

How to grep-inverse-match and exclude “before” and “after” lines

Consider a text file with the following entries: aaa bbb ccc ddd eee fff ggg hhh iii Given a pattern (e.g. fff), I would like to grep the file above to get in the output: all_lines except ...
1
vote
2answers
65 views

Mac drive in use, understanding lsof

I am trying to repair permission on my external HD as I can not empty my trash when its plugged in because I get a bunch of "such file is in use". I read online that this might be resolved by ...
39
votes
7answers
9k views

Software developer switching from Linux to OS X, what are the gotchas?

I have used Ubuntu/Fedora/Red Hat/Suse but haven't used OS X at all. If I have to start using OS X regularly, what are the things I should look out for? Tools I use are GNU tool chain, C++/Boost, ...
1
vote
1answer
24 views

how to use dd to backup second linux hard drive from os x?

I have a MacBook with Linux installed on the primary hard drive. On an external USB 3.0 drive, I have OS X installed. The external drive has plenty of space so I would like to boot up OS X and make ...
3
votes
1answer
98 views

OS X FileVault 2 duress password

I've been attempting to add a custom script to run after the FileVault password is entered on login that will check whether it a 'special password' that will run a script in the background after ...
0
votes
0answers
8 views

OS X Java Security Edit Site List En Masse

I'm sure, like many other systems administrators like myself who use Mac, you've come across the dreaded Java Security site list and the need to add IP's for individual blades, servers and anything ...
2
votes
5answers
576 views

How to edit/delete a .dot_file on mac without using Terminal

When I start Terminal I can not control it. It starts executing an endless loop repeating that some alias does not exist. Because of this I am not able to edit this file using a program such as vim. ...
5
votes
3answers
569 views

bash does not autocomplete my command when using sudo?

I'm using SaltStack. I would like to auto-complete the minion name when calling the salt command. The following line has been added into ~/.bashrc: complete -o default -o nospace -W "$(sudo ls -1 ...
1
vote
2answers
48 views

Making persistent USB with minimal OS on os x

I am looking to turn a 8g usb into a bootable drive with a minimal OS. All i want is an OS that will allow me to use vim, nothing else (no internet/any other services). I basically want to turn a usb ...
1
vote
0answers
40 views

osx - dd command behaving weirdly [duplicate]

I've been using dd for a couple of years now, most of the time successfully. I usually use it to dd Linux images to USB drives. My workflow doing so is as such: convert .iso image to a .img format ...
3
votes
1answer
3k 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 ...
1
vote
3answers
2k views

How to troubleshoot failed X11 forwarding with ssh?

When I try to establish an X11-forwarding connection to myserver, I get the following error: % ssh -X myserver xlogo X11 connection rejected because of wrong authentication. X11 connection rejected ...
1
vote
2answers
128 views

tmux blocks certain things on my Mac

I really like tmux and use it often so I set the following in my .zprofile: [[ $TERM != "screen" ]] && exec tmux so when I open a new window, tmux will be there for me. However, there are ...
0
votes
1answer
34 views

color scheme setup for iTerm

How do you setup color scheme of iTerm on Mac? For color scheme, I mean using different color to display folder name, file name, machine name, etc.