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
0answers
58 views

OS/X: can't execute shell scripts - spawns a new window which exits immediately

Issue: When I try to open any shell scripts a new window is spawned, which exits immediately. Files .bash_profile, .bashrc and a helloworld.sh are tested examples. Interestingly, running open ...
0
votes
2answers
27 views

How do I open BSD System Calls Manual instead of BSD General Commands Manual?

Suppose I wish to read about wait syscall. Typing man wait would only give the manual entry for wait as in shell, not in syscall. However if I type man waitpid, I would get the manual entry for wait ...
0
votes
1answer
56 views

Type curly brackets on Debian running on mac

I have searched for this problem for a while and can not find an answer anywhere. I am currently running a Debian on virtual box on a mac. How do i type the "Alt Gr" Characters like curly brackets?
0
votes
0answers
39 views

Set Default Boot Device for XServe in Open Firmware

I have an old Apple XServe G4 that I successfully created a dual boot of Mac OS X and FreeBSD 10.2. In order to boot the machine, you have to go into Open Firmware and issue a boot command... I ...
2
votes
2answers
131 views

How to switch to root and use same dotfiles as my normal user?

I run zsh on Mac OSX, and sometimes want to switch in the terminal to the root user. I'd like to keep all my dotfiles, and environment path configuration and scripts from my regular user, and just do ...
3
votes
0answers
51 views

Use a “Friendly” Label on Drives or Partitions in FreeBSD

Maybe I am missing this and it's really simple, but I cannot figure out how to label a BSD disk. I have looked at tunefs or gpart and even disklabel, however none do what I am looking for - I don't ...
36
votes
3answers
19k views

Where does Mac OS X come from?

Discussing with Mac owners, I got several versions of where Mac OS X comes from. It is known to have some root in BSD, but how much, and where? Some say that Mac OS X has a FreeBSD kernel, with all ...
2
votes
1answer
80 views

bash shell doesn't appear when terminal is launched

Whenever I launch terminal in my Macbook Pro. The terminal doesn't show command line of bash shell. What appears is the command line of Mathematica 9.0. It has been long time after installing the ...
1
vote
1answer
91 views

How can I install Arch Linux on Mac? On an external hard drive?

How can I install Arch onto a Macbook Air 2014? I'd also like this to be on an External Hard drive. I know how to boot into the BIOS and everything, I just feel like none of the guides have helped me. ...
13
votes
4answers
11k views

sed on OSX insert at a certain line

So I've been using 'sed' on linux for a while, but have had a bit of difficulty trying to use it on OSX since 'POSIX sed' and 'GNU sed' have so many little differences. Currently I'm struggling with ...
56
votes
7answers
17k views

what does the @ mean in ls -l?

I am using Mac OSX. When I type ls -l I see something like drwxr-xr-x@ 12 xonic staff 408 22 Jun 19:00 . drwxr-xr-x 9 xonic staff 306 22 Jun 19:42 .. -rwxrwxrwx@ 1 xonic staff 6148 25 ...
21
votes
3answers
4k views

mv a file to /dev/null breaks dev/null

If I do: touch file; mv file /dev/null as root, /dev/null disappears. ls -lad /dev/null results in no such file or directory. This breaks applications which depend on /dev/null like SSH and can be ...
0
votes
1answer
52 views

Booting CentOS from live usb on OSX El Capitan

I have been trying to set up a live usb to use to study for the RHCSA/RHCE certification. CentOS launches and gives me the launch page I choose the standard option, I have not tried text mode etc. ...
1
vote
1answer
142 views

generate file names in loop [closed]

DISCLAIMER: I am using Mac OSX. The bash script is in a different directory from the files that require processing. From here my struggle begins… HELP 1: I have multiple files each housed in a ...
3
votes
2answers
157 views

Find all files modified around a known one

An installer which isn't really clean (Adobe Acrobat Reader DC) installed on my Unix (Mac OS X) a lot of files in different places. I have a reference file Application which I am pretty sure was ...
0
votes
2answers
43 views

Linux beginner. What OS should I use? [closed]

I recently started JAVA programming and I would like to start learning Linux programming simultaneously. I run a mac and I am planning to use Oracle VM VirtualBox to boot linux. What kind of Linux OS ...
0
votes
1answer
60 views

How do I remove “^M” from a file? [duplicate]

I have two "identical" files that I compare in diff, and it shows that every line is different, after looking at the file I found that one of them has ^M at the end of every line. How do I remove this?...
1
vote
1answer
66 views

Using terminal to reset icon cache - which method?

I've been trying to find out how to reset the icon cache on my MacBook, and two methods seem to always be suggested. However, the two approaches differ slightly in the third line. Method 1 sudo find ...
2
votes
1answer
40 views
0
votes
0answers
57 views

Shell scripts for proof reading

I am using below mentioned script present at link to check my writing. But, while running the scripts some syntax errors are shown up. I am not able to correct the same. Haroons-MacBook:democheck ...
1
vote
1answer
315 views

Symlink to file which does not exist yet

I'm currently trying to cleanup my home directory by moving files like .vimrc, .bash_profile, etc. to a directory .dotfiles in my home directory. The idea is to use symbolic links to these files ...
1
vote
1answer
392 views

ssh algorithm negotiation failed

Problem Ok, the problem is that I am using Pycharm on El Capitan. I am trying to connect to a server that has strict login Kexalgorithms using the newer Key Exchange Algorithms than Pycharm seems to ...
3
votes
1answer
1k views

How to set the path OSX applications use

I'm running Mountain Lion 10.8.4, and have my environment all customized through ~/.profile so that when I run GUI apps like Sublime Text or Eclipse from the command line open /Applications/Sublime\ ...
4
votes
0answers
172 views

What processes are used by DRM?

Whenever some content is DRM-protected, screenshots of such content are masked. Even using Terminal does not avoid such problems. Which processes in ps ax are used by DRM that is implemented by ...
0
votes
1answer
111 views

Resolving Error: Running Xilinx through Wine

I've run the Xilinx 14.7 Full Installer for Windows successfully via Wine on the prefix com.xilinx.verilog, then went to ~/Library/Application\ Support/com.xilinx.verilog_145331572525077/ to confirm ...
1
vote
0answers
133 views

OS X El Capitan , systemstats:com.apple.telemetry.shutdown

Last night I reinstall OS X El Capitan on may macbook air 11 inch and after I did updates , I shutdown the macbook and went to sleep.İn the morning , I opened it and I saw it was just on sleep. I'm ...
0
votes
0answers
76 views

Samba Debian Server + OSX Client = High CPU Load

I've a Debian server running Samba 4.1.17-Debian the shares are ok and it works fine most of the time. However when I connect an OS X client the server CPU goes to 100% and never comes down util the ...
1
vote
0answers
82 views

Why is my rsync slow?

I run a rsync job transferring about 45 million files/approximately 1.8 TB data (a Mac OS X Time Machine backup) over a 100 MBit connection. I use rsync 3.1.1 from MacPorts (I first tried the built ...
1
vote
1answer
26 views

Workaround for missing rm -I option on OSX? [duplicate]

I'd like to do this, on OSX: alias rm="rm -I" In GNU rm, this means that rm will prompt if it's recursive or if it's deleting three or more files, but not if it's just deleting one or two files. ...
2
votes
2answers
40 views

Lock A Built-in Application?

I know I am able to lock an application using: sudo chmod a-x /Applications/'Application'.app but I encountered a problem while trying to lock an application, like safari, which is built in. ...
2
votes
1answer
93 views

Execute a command after each output line from ping command

I am trying to build a one-line command to monitor when my Internet connectivity drops. I'd like it so that if I run ping www.google.com indefinitely (one ping per second), if the word "timeout" ...
-1
votes
1answer
23 views

Lock a Application Through Terminal

I was wondering if it were possible to lock a Application through Mac Terminal. I know there's a way to lock files, using chmod a+x 000 'directory', but it never worked with an Application. What I ...
5
votes
1answer
74 views

Behavior of grep -o on OSX

On Linux, when I do echo foo | grep -o '^.' to get the first character, it prints f as expected. (I know, | cut -c1 would probably be faster.) But on OSX, doing the same results in 3 matches (3 lines)...
1
vote
0answers
60 views

Schedule (Cron) executing tasks based on bash scripts using CronniX

I'm still quite new you Mac and OS X but do have some background about other UNIX based systems, so please excuse for any misunderstandings. My goal is to implement a function that executes certain ...
0
votes
1answer
44 views

How do I check if a directory is locked or not in bash?

I have only been able to find solutions for files, and not directories, like lsof. chflags has no read option, so I don't know how to do it.
-1
votes
2answers
174 views

Is MacOS (OSX) a multi-user-operating-system?

We had to set up a MacOS (OSX) for iPhone app-development, but it was really awful to realize that mouse speed and input language, or applications that run as services (teamviewer) can be changed by ...
11
votes
5answers
19k views

Simple sed replacement of tabs mysteriously failing

This ought to be really simple, but for some reason it is not working: sed -i.bak -E 's/\t/ /' file.txt Instead of replacing tab characters, it's replacing t characters. I've tried every ...
1
vote
0answers
380 views

Macbook Pro Retina 2015 Wifi problems on Kali

I have successfully installed Kali 2.0 on my Macbook Pro retina 2015 model running El Cap via dual boot. I do have some experience with ubuntu etc, and thought I'd try Kali for multiple reasons. Now,...
1
vote
2answers
78 views

Generate unique numbers RANDOM function OS X

I am creating a random generator based from a number array list. However, I would like it to be unique so that random number cannot be used again. I have tried creating a 'USED' array list which will ...
0
votes
1answer
538 views

Upgrading from Python to 2.7.10 to 2.7.11 on OSX

How can I upgrade Python from 2.7.10 to 2.7.11 on OSX (Yosemite)?
0
votes
1answer
59 views

Umount command unmount two mount points

I have two mount point say, /volumes/dir1 and /Volumes/dir2. When I umount one volume the other automatically gets unmounted. The volumes are mounted from remote system. They output different file ...
0
votes
2answers
97 views

Resource usage (% CPU) for given command on OS X

The time -v command outputs % CPU utilization for a given command on Linux. How do I do this on OS X? The Linux/OS X difference is illustrated here. I would like to measure multi-core utilization ...
2
votes
2answers
102 views

sed to match pattern between matching curly braces

From a pattern such as [string 1]{string 2} I want to extract string 2, the string between the last pair of matching curly braces -- that is delete [string 1] and the open { and close }. My ...
0
votes
2answers
43 views

Is there an equivalent of javascript Math.min() in bash/bc etc.? [duplicate]

I need to convert some javascript calculations to bash, and I am wondering if there is an equivalent function of javascript Math.min() in bash, bc or any other calculator in the shell?
1
vote
0answers
35 views

How do you pass variables to jsc/javascript?

I have a few javascript things that I am running from the Terminal by passing them to jsc, with <<<. (javascript is an alias to /System/Library/Frameworks/JavaScriptCore.framework/Versions/...
0
votes
0answers
45 views

Array Creator Bash OS X not expected output

I am creating a script which will prompt a user to enter a location of a text file and based from that it will create an array. First Question The text file that I am using is sample.txt and it is ...
3
votes
2answers
135 views

How to delete, without rm/unlink

Related to another question I asked here [http://unix.stackexchange.com/questions/253932/rename-folder-with-odd-characters] I'm wondering if it's possible to bypass the normal rm/rmdir/unlink ...
0
votes
0answers
23 views

how to interpolate a variable in a string to be called from the cli [duplicate]

I would like to have: alias lstime="gfind -type f -printf '%T+\t%p\t%k kB\n' | sort -nr | head -${1}" in my .bash_profile on El Capitan. So that I can call it via: lstime 10 and that the 10 ...
0
votes
3answers
95 views

strange vi behavior on OSX Debian ssh terminal

While creating a swapfile I issue vi /etc/fstab as root. fstab file comes up, great. Issue G $ to jump to end of line and i to enter INSERT mode. Press the right arrow to move the cursor over by one ...
1
vote
1answer
326 views

Get absolute path of file OS X

I am creating a script which will prompt the user to enter a location of file and it will convert it to an absolute path. This is what I have so far. I'm not sure how to append these together. ...