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
votes
0answers
11 views

How can I make a Linux system output a bell sound when no packet is received before the next packet is transmitted with the ping command?

This is easy enough on OS X. I just use ping -A example.com and it works just fine. (Note the capital "A".) But it doesn't work like that on Linux. On Linux, the manual page reads as follows: ...
0
votes
0answers
9 views

replacing first link of a text “awk equivalent of sed command”

I wanted to replace the first line of a text with sed it should be like sed -i.bak "1 s/^.*$/"CompoundState\tMethod\tApproach\tS^2\tEnergy\tPath"/" awk.xls but I also need to run it on OSX but it ...
0
votes
0answers
9 views

Preserve colours when piping to tee

I have made a little program where I update homebrew with brew update, then I send the output to a log file, but I also want to keep it on the terminal so I use tee. The problem is, it doesn't show ...
3
votes
5answers
233 views

How can I get the raw formatting output of commands?

I'd like to know which control sequences are sent to bash by programs to format their outputs. For example, if I dump man less I can discern which parts are bold or underlined. ...
0
votes
2answers
11 views

how to locate vim which installed by brew?

I have installed a vim using brew, and it was installed to a very different place, and now I want to locate that vim, in a shell script, is there a good approach for this?
-1
votes
1answer
20 views

Macbook Pro Display Issue (Tiny blue squares) [on hold]

My Macbook Pro display recently started showing tiny blue squares everywhere on screen. I have tried doing VRAM and PRAM reset, upgrading to Yosemite but downgraded because it was very slow and I ...
3
votes
2answers
44 views

What is the problem of giving the right to use sudo vim? [on hold]

I'm using Mac OX 10.10. I would like to know what problems are caused by this: user ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf I think this is in /etc/sudoers. I also have Cent OS. Does this ...
0
votes
1answer
18 views

The server Emacs can't recognize the ALT key when link by a Mac

I use Mac's ssh to get access the server. I find the emacs in server can't recognize the ALT key. My server is REHL with emacs23
1
vote
0answers
10 views

How can one enable sharing for a mounted volume via command line? (2 Macs)

I am trying to remotely enable "sharing" on a volume connected to a remote host. So, in other words, from my local machine I'm trying to ssh into another machine where a volume is already mounted. ...
0
votes
2answers
34 views

Check if process is running Mac OS X then execute code

I am creating a script which clears the cache for Google Chrome. However, I would like to check if Chrome is open and if so not run the code but if it isn't then it will execute the code. I can see ...
1
vote
1answer
25 views

Searching inside archives for specific files and patterns [duplicate]

Is it possible to grep inside a bunch of archives with regular expressions on both the names of the files they contain and the contents of those files? I would like to know which files in which ...
1
vote
1answer
54 views

How can I *automatically* backup my contacts in Google Contacts/Gmail?

On a similar theme to this question, how can I automatically (on a schedule) back up my contacts from Google Contacts/Gmail from the command line (Linux or OS X)? Ideally, this mechanism would be a ...
22
votes
6answers
19k 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 ...
1
vote
1answer
572 views

Create bootable hfs+ partition for macbook

I've installed Debian testing on a Macbook Pro (mid 2014) without keeping OS X on the internal SSD. I've used the following GPT partition layout: HFS+ EFI on /boot/efi BTRFS on / SWAP on swap I've ...
2
votes
2answers
39 views

How can I make the `cal` tool in OSX highlight the current day?

In Ubuntu and Fedora, when I type cal on the command line I get an ASCII calendar with the current day highlighted. In OSX, when I type cal, I get an ASCII calendar but no day is highlighted. How ...
1
vote
1answer
812 views

Installation Step Failed (installing the system) - Kali Linux

I am trying to install Kali Linux on a Virtual Machine using Virtual Box on an OS X host. The only issue is I get this error: Here are logs of my errors: hardware-summary partman syslog Also if ...
-1
votes
0answers
18 views

How do I create a telnet server on Mac OS 10.10?

I want to create a telnet server on my mac and I am running Yosemite (10.10). I have successfully enabled telnetd (I think) but I type telnet localhost it asks for my login and password. I enter in ...
1
vote
1answer
920 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 ...
0
votes
1answer
22 views

OS X Directory Services

I have been reading from Advanced Programming in the UNIX environment (Stevenson and Rago), and I am currently reading about how user data is stored on various systems, including Linux, FreeBSD, and ...
1
vote
0answers
24 views

What exactly files whose names' prefix is “AT.postflight.” are needed for?

I am not sure if this question should be asked here, since I am on an OS X, but since I am using bash, and I am asking about the meaning and the purposes of some files. I am trying to understand why ...
15
votes
2answers
15k 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 ...
1
vote
2answers
28 views

List all directories whose contents (files) have not been updated or accessed before a certain date?

Would like to easily located folders to archive/trash and an easy way to automate this would be to choose folders I haven't made any use of for years. Since folders themselves can have different ...
2
votes
2answers
64 views

Why does my ls --help not work?

Marias-MacBook-Air:~ marias$ ls --help ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
0
votes
2answers
56 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 ...
2
votes
4answers
56 views

Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()

I have a file that has click css_add_violation_false click css_add_claim_false and select css_driver1_birth_date_month birth_date_month select css_driver1_birth_date_day birth_date_day How ...
1
vote
3answers
51 views

How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?

I like to use vim to edit other (non-programming languages) stuff. So I paste the content into vim and make the changes. How can I copy all of the text back into the primary clipboard for pasting? ...
0
votes
1answer
22 views

Offlineimap unknown SSL protocol error

I am using offlineimap to fetch mail from several IMAP servers. This used to work but today offlineimap has been unable to fetch mail, producing the following errors: *** Processing account example ...
72
votes
10answers
51k views

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
12
votes
3answers
752 views

No colored output in less for the ls command

If I run ls I get colored output which I find pretty handy for quickly getting a glance of the kind of file. When I try to pipe it to less even with the -r and -R flags the coloring always get lost. I ...
1
vote
2answers
870 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 ...
3
votes
0answers
21 views

cursor and combining diacritics in shell

I frequently deal with combining diacritics, especially the combining acute accent (U0301, or \xcc\x81). I have a keyboard set up to insert this character, and that works fine in the shell. $ echo а́ ...
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 ...
0
votes
1answer
57 views

What's wrong with this grep?

> output2.txt cd # some directory i'm trying to search find views/shared -type f -name "*.js" -print0 | while IFS= read -r -d $'\0' line; do echo -n "${line%.js}" | tee -a ...
1
vote
1answer
16 views

tstime and memory usage

So I am interested in measuring the high-water memory usage of a process. I would love to be able to use tstime but am having troubles figuring it out. Does it work in Unix? When I go to ...
1
vote
1answer
710 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 ...
1
vote
2answers
25 views

Bash not sourcing ~/.bash_profile on os x

I just got this really wierd poblem. When I start bash, I get these two lines: -bash: fasd: kommandot finns inte -bash: brew: kommandot finns inte "kommandot finns inte" means command does not ...
21
votes
4answers
28k views

How to persist ulimit settings in OSX Mavericks?

Before Mavericks, one could use /etc/launchd.conf to persist ulimit settings, for example: limit maxfiles 16384 unlimited limit maxproc 16384 unlimited It no longer works in Mavericks. What is the ...
0
votes
0answers
19 views

On OSX, vi seems to return 1 unexpectedly despite no error

So, on stock Mac OSX Yosemite, if I run vi /tmp/foo and then type in some text, and finally do :Wq (a common typo I make) and then :wq. Everything will appear to be fine, but for some reason the exit ...
24
votes
6answers
14k views

Why Mac applications never get “closed”?

I'm a Linux/Windows/Mac user. I like all systems, *nixes more than Windows, but I like all nonethless. I started using a Mac this year, and a difference between Linux and Windows that I can't ...
3
votes
1answer
2k views

Mac OS X partition type problem

As a 2 decades of MS-Windows user I have switched to Mac OS X a month ago. And my knowledge is not enough to fix my big problem which I encountered yesterday and my brand new MBPro is dead now. I ...
3
votes
1answer
59 views

Shuffle two parallel text files

I have two sentence-aligned parallel corpora (text files) with about 50 mil words. (from the Europarl corpus -> parallel translation of legal documents). I'd now like to shuffle the lines of the two ...
3
votes
1answer
50 views

Round-tripping text through zip, unzip fails with 'extra bytes' error on OS X [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 the following output: ...
0
votes
0answers
9 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
34 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
1answer
839 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
58 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, ...
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
21 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
37 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> ...