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.
1
vote
1answer
31 views
Control + L not clearing screen
When I try to clear my terminal screen on OSX:
computer@ ~ () $ ^L
And when I hit Enter after that it just shows:
-bash:
: command not found
Any ideas on how this happens?
My .bash_profile, ...
6
votes
2answers
98 views
Why do some applications stop working when permissions are changed in /usr/bin?
On OS X, a friend of mine changed the permissions on /usr/bin recursively using Finder, in order to grand write access to everyone.
Here is how it's done:
Go to /usr/bin in Finder, then mess with ...
1
vote
1answer
31 views
How can I tell why a process is waiting?
I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that Control + T is a Unix command to show the status of a foreground job. Pressing it several times over the ...
7
votes
3answers
354 views
How to permanently change both STDOUT and STDERR color to grey?
This question is similar to
Can I configure my shell to print STDERR and STDOUT in different colors?
But I am looking for a solution that will allow me to change both STDOUT and STDERR to ONE color. ...
2
votes
3answers
13 views
Piping content with multiple spaces
I was attempting to copy files listed in a text file into a directory such as:
cat files.txt | xargs -I{} cp "{}" ~/Desktop/temp
However I noticed that some files would not copy over. The files ...
3
votes
2answers
108 views
ssh-add in not persistent between reboots
I add a ssh key to the agent by
$ ssh-add ~/.ssh/id_rsa_mac
Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac)
After reboot I don't have this key added anymore:
$ ssh-add -l
...
3
votes
2answers
22 views
How can I list the info for an array of /dev/disks using bash expansion or substitution?
I want the output of:
diskutil list; diskutil info [multiple devices]
Without having to do:
diskutil info disk0; diskutil info disk0s1; diskutil info disk1 ...etc
For example, with many builtin ...
5
votes
1answer
419 views
What is equivalent to Mac's purge in Linux?
In Mac I use purge to free up some memory. What is equivalent to it in Linux(Ubuntu Server)? apt-get install purge gave me nothing. If you are no familiar with Mac's purge here is it's man page:
...
1
vote
1answer
28 views
Set file creation date to its modification date on OSX
I need to batch edit file creation date (some stupid audio recorder set the file creation date to UNIX epoch and the correct recording date in the modification date) to set it to the files ...
0
votes
0answers
18 views
[Solved]man crashes on OS X after upgrading bash and its manpages
Bash on OS X is always so old that I finally decided to compile a never(4.3.18) one and simply override and replace the old one.
Here are the configure flags I used:
./configure --prefix=/ ...
0
votes
0answers
12 views
Why does directory vanish when I do SSHFS? How to setup SSHFS share on Max OSX 10.9?
I'm running Max OSX 10.9.3 and I'm trying to setup an SSHFS file-share between my MacBook Pro and a remote file system. However, when I try to do it, it doesn't work.
Strangely enough, it makes the ...
2
votes
2answers
38 views
Is it possible to obtain OS X versions of Unix tools on modern Linux distributions (like Ubuntu or RedHat)?
I have observed that there are often subtle and often annoying differences between the default versions of certain command line tools like paste and sed on modern distributions of Linux versus OSX. ...
1
vote
1answer
48 views
How to change the output color of ls comman in terminal in OS X and iTerm2?
I know that a similar question has been as in:
How to colorize output of ls ?
Though, I didn't really understand the answer and couldn't really make it work.
However, I have tried something ...
0
votes
1answer
64 views
scan and connect to wifi from linux terminal on virtual machine
I am trying to scan wifi networks via Linux terminal running on a virtual machine. I am running virtual machine on Mac OS. On MAC terminal, I can see all Wi-Fi networks using (airport) command and can ...
0
votes
0answers
18 views
How to add entries in GPT/ guid table without booting in is?
I foolishly deleted entries from guid or gpt table while messing up with gdisk utility,
As a result no bootable partition shows up on startup ! I'm stuck at blank screen please help !
How shoul I ...
0
votes
1answer
37 views
How to get the same ls with colors working on both OSX and Ubuntu?
When I want color in Ubuntu I do
alias ls='ls --color=always'
but on OSX this gives an error ls: illegal option -- - and I need to do
alias ls ='ls -G'
How can I create an alias with the same ...
2
votes
0answers
30 views
OSX/Darwin ACL Format
In OS X, if you want to view the ACL information on a file, you can do so with the -e option of `ls.
$ ls -lde app/cache
drwxrwxr-x+ 7 alanstorm staff 238 Apr 1 10:02 app/cache
0: user:alanstorm ...
1
vote
2answers
66 views
Limiting access to a website based on IP address when .htaccess is not allowed
I am trying to limit access to a website to a small set of IP addresses. I am a regular user on the Mac OSX web server. My first attempt at limited access was to create an .htaccess
order deny,allow
...
2
votes
1answer
44 views
Running a command without ./
I am trying to understand something that might be very simple for a lot of you but is quite puzzling from me as a daily Windows user.
I am following the docker installation on Mac OS X.
One of the ...
1
vote
0answers
49 views
Add a user for Postgres on Mac
I've had a very difficult time trying to set up a postgres database. I am using Mac OS X 10.9.2.
I am using this tutorial: http://tutorials.jumpstartlab.com/topics/environment/environment.html
The ...
0
votes
3answers
51 views
Obtain .cer file from .pem file
I have generated RSA private key using below command:
openssl genrsa -out privkey.pem 2048
And created a self signed certificate using below command:
openssl req -new -x509 -key privkey.pem -out ...
1
vote
1answer
25 views
Using a zsh function in find?
I'm on OS X and have defined a function called finderpackage that tries to determine if a folder is in fact a "package" (also, somewhat erroneously, known as a "bundle") according to the Finder.
My ...
0
votes
0answers
24 views
zsh completion doesn't correct ? (question mark) in paths
So, I've been pretty happy with my zsh completion and correction configuration for a while now, with this being a major exception.
Configured as I have it, the shell routinely catches and corrects ...
0
votes
1answer
26 views
-bash: pkcs12: command not found
I am trying to export the private key and certificate to p12 file using below command in my mac os X - Mountain Lion:
pkcs12 -export -out privkey.pem -inkey privkey.pem -in rsaCert.crt
but I am ...
1
vote
1answer
133 views
Mac OSX vs Linux Unix-ness [closed]
So I know that Linux is considered "Unix-like" while OSX is Unix.
Why is this? I feel like Linux is much more "Unix-like" than OSX is.
What makes OSX more "Unix" than Linux?
1
vote
0answers
20 views
newsyslog for paths with empty spaces
How can I configure newsyslog to trim logs with paths containing empty spaces?
I define my paths at /etc/newsyslog.d/frank.conf like this:
"/Users/frank/Library/Application ...
0
votes
1answer
53 views
Using eval and sed to perform counting and script control
Following the original issue described here:-
Rip chapters of a DVD to separate files
..would someone help us understand what the following code is doing:-
# count Titles, and count Cells per title. ...
0
votes
1answer
45 views
Move Data from Partition to Partition on Same Drive
Moving data from one drive to another is slow.
Copying data on a drive to it's self is slow.
Moving data from one drive to it's self is fast.
If I'm moving data on the SAME drive but a different ...
3
votes
1answer
103 views
How do I start a virtual machine in background upon OSX system start?
I have a virtualbox machine on a OSX 10.9.2 host. I do not want to open VirtualBox everytime and start the machine there. Also, I do not need the the screen output as I will just ssh from OSX terminal ...
0
votes
2answers
29 views
env command shows 3 times same path
When i run env it shows 3 times /usr/bin under PATH . Same for every path under PATH title. For example - my scala bin directory shows 3 times . However, in my .bash_profile, it is written just one ...
-1
votes
1answer
62 views
Why sudo ./bin/mysqld_safe & on Mac OS X 10.6.8 doesn't ask for password?
I get the following permissions from terminal:
$ cd /usr/local/mysql
$ ls -l
drwxr-xr-x 41 root wheel 1394 29 Apr 00:55 bin
drwxr-xr-x 4 root wheel 136 29 Apr 00:55 docs
...
1
vote
1answer
37 views
How to fix SSH on OSX?
I have been able to connect to OSX machine using ssh client successfully for hours, but then it stops working and I get connection refused.
ps -ax | grep ssh
841 ttys004 0:00.00 grep ssh
Using ...
2
votes
2answers
103 views
grep print relative file path when doing a recursive search
I'm trying to find out which version of hibernate the project depends on (this is orthogonal to my question).
We have a parent project with several sub projects, and I know this is defined in one or ...
0
votes
0answers
23 views
Networksetup, how do I make an IF loop for error on connection?
I'm attempting to connect to a network in Mac OSX with this command:
networksetup -setairportnetwork eno "NETWORK_NAME"
and can most often connect to the network.
But I need to make an IF loop for ...
1
vote
3answers
64 views
Remove multiline text with special chars from all files in a folder
I have multi-line text with special characters (i.e. //*(): etc) looking like following in multiple files in a folder that I'm trying to remove. Tried all different solutions using sed and awk but ...
2
votes
2answers
40 views
How to format textutil -excludedelements
I use Geektool on the Mac to display various information on my desktop. One feature of Geektoool is the ability to use shell mode to launch custom scripts or commands. I am not versed in any type of ...
2
votes
0answers
324 views
Installing Arch Linux alongside OS X - Bootloader issues
I have installed Arch Linux alongside my OS X install on my MBP 11,1 using the guide found here, however on the last three commands of the boot loader section I get the error
/usr/sbin/grub2-probe: ...
1
vote
1answer
29 views
osx server, windows client, running emacs opens it on server not client
I've installed emacsformacosx on my OSX box. I'd like to shove my macmini in a data center and run it headless. I've gotten x-windows working. If I run xeyes, it displays on my Windows 7 client. ...
3
votes
1answer
44 views
Apropos always returns several duplicate matches from whatis
When I run apropos or man -k in bash, it always returns the same item (at least one) twice:
Question
Why is it doing this; and would it indicate that there's a possible configuration issue with my ...
4
votes
3answers
250 views
Send a specific signal to an external USB keyboard? Or, how do I fix fdopen()?
Some background: I'm trying to make the caps lock light on an external keyboard light up on-command when I run a command from the command line. Ideally it would be scriptable, so that I can use it for ...
2
votes
1answer
35 views
Using setuid Properly
I've been scared too much by the warning about setuid. However I cannot find a way around using it.
I want to be able to run:
arp -s 198.51.100.1 00:53:00:12:34:56
as the user steven but arp -s ...
5
votes
3answers
164 views
Extracting data from complex file structure
I have a txt file that is a dump from a database, that contains one entry per line. The structure is like this:
1500
29/03/2010
18
02
09
47
17
45
28.248
0
0.01
130
12.721
7908
298,809
YES
...
0
votes
2answers
36 views
simplest way to get an ubuntu virtual machine w/ ssh server on my network
I have an OSX box and I'd like to just get a fresh install of Ubuntu to use remotely over SSH. That's all. But I'd like to get that on the same box without in anyway altering my existing OSX ...
1
vote
1answer
36 views
how to debug/fix screen crashes on startup
(this is a question in reference to the OS X version of Gnu screen. I don't know if this makes any difference - and I guessed that Unix & Linux would have better screen-fu than Ask Different.)
...
0
votes
0answers
128 views
Failed to download the JMeter CA certificate for HTTPS recording
I am unable to run HTTPS recording in Jmeter. I have used "jmeter_proxy_step_by_step.pdf" for the setup. The Jmeter version is 2.11 and Java jdk7. But I am unable to generate the certificate.
The ...
0
votes
1answer
71 views
No xauth data; using fake authentication. Unable to display remote windows
Whenever I try to ssh -X or -Y into a remote Linux server from my Mac (OSX Mavericks) machine, I get the same message:
"Warning: No xauth data; using fake authentication data for X11
...
0
votes
0answers
32 views
How to find the currently running app from terminal on OS X?
I'm writing a shell script runs in the background and monitors user activity. I'd like to be able to capture current application/document if possible. Can I do that?
(Cross-posting this from ...
1
vote
1answer
23 views
rsync from Mac ext hd to VPS works but not VPS to Mac
There are no errors with either
rsync -a /Volumes/hd/dir_foo [email protected]:~/
or
rsync -a [email protected]:~/dir_foo /Volumes/hd/dir_foo
in the first instance the synced folder on remote system CentOs ...
0
votes
4answers
83 views
Mass mv on files and changing filenames [duplicate]
I want to change these filenames
download (19).download
...
download (27).download
to
download (19).html
...
download (27).html
I run unsuccessfully
mv *.download *.html
usage: mv [-f | -i | ...
0
votes
0answers
28 views
Debian on macbook air not booting
I installed Debian on my macbook air a week ago after first going through the http://www.rodsbooks.com/refind/installing.html#osx installation guide. The installation of Debian worked fine and i ran ...







