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
105 views

Increasing the partition size of Kali in VMWare Fusion on a MAC

I've tried using Gpartition but the option to edit the partition isn't available. I've also obviously increased the space VMWare Fusion 4 saves for the vm to 80gb which shows in GPartition.
5
votes
2answers
981 views

What should I be aware of when installing Linux on a Mac?

I have a Macbook Pro and I am loving it, though I still miss my Linux box, there are many things I need which are not completely compatible with Mac OS X. I heard many stories about installing Linux ...
0
votes
0answers
42 views

How do I restore the directory expansion arrows on Nautilus?

On Mac OS X in the list view I can click on arrows to the left of the directory and expand the directory's contents. I used to be able to do the same on Nautilus, but that functionality now seems ...
3
votes
1answer
317 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\ ...
3
votes
2answers
256 views

Mac OS X command-line tools - differences from FreeBSD

As I understand it many Mac OS X command-line tools (like ls, cp, chmod, chown etc.) are imported from FreeBSD. Which version of FreeBSD contains the command-line tools most compatible with the OS X ...
1
vote
1answer
35 views

why the “open” command runs under the home directory?

Under Mac OSX (Mountain Lion), I have a shell script "a": #!/bin/bash open -a Terminal b which run another shell script "b" using Terminal: echo `pwd` Something interesting is that, no matter ...
1
vote
1answer
48 views

How can I get a regular gcc etc. under HomeBrew under Mac OSX Mountain Lion?

I have a Mac with command-line developer tools installed, including Apple's LLVM C compiler, present as /bin/gcc. How can I get a real gcc installed so that e.g. make will see the standard gcc ...
1
vote
1answer
1k views

convert timestamp to formatted time OSX

I had this working on Ubuntu but I'm now trying to run the script on OSX but it seems that the formatting of date is different. Originally I had: date -d "$MODDATE" +%F" "%H":"%M where $MODDATE is ...
2
votes
2answers
315 views

See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have ls set to use the coreutils version of ls [(GNU coreutils) 8.21] when available: if [ -e /opt/local/libexec/gnubin ]; ...
1
vote
2answers
130 views

Remove 2 and 3 newlines in a text file but not 1

I'm developing on a max osx 10.8 and have no preferences to which tool to use probably sed but it doesn't matter. Update after comment: The input file uses windows new lines if that's complicates ...
12
votes
6answers
6k views

How can I display the contents of a text file on the command line?

I would like to display the contents of a text file on the command line. The file only contains 5-6 characters. Is there an easy way to do this?
3
votes
4answers
211 views

Show video files with its size

I need all the .mp4 files' dimensions to be printed with the file name. For example: 1_VIDEO.mp4 1204x680
1
vote
1answer
248 views

Non-ASCII characters handled incorrectly on command line

I have a problem with non-ASCII characters in the Terminal on Mac. If I write: echo ÆØÅ Then press Enter, Arrow Up, Arrow Left, so the cursor is between the Ø and the Å, then write X, then the Å is ...
1
vote
0answers
150 views

Can't unlock a file for path change

I'm trying to order the path entries on my mac, but it seems that my /etc/paths file is Locked. I tried the instructions on this link, but I can't save the file as it is locked. I even tried chflags ...
1
vote
1answer
99 views

Why is this copy/paste in vim configuration not working properly?

I have the following in my .vimrc vmap <C-c> y imap <C-p> <esc>P So that I can do my classic sortcut for copy/paste. It works fine on Cygwin but not in my ssh session to ...
5
votes
2answers
261 views

Prevent a file from being deleted even after rm -f

I usually stay on StackOverflow but I think on this topic you guys are much more experts here. So today's exercise is weird, I have to write a script.sh and in it do whatever I can to prevent ...
0
votes
1answer
553 views

SSH hangs forever?

I'm trying to SSH into a remote VM, and the command hangs forever. Before, when I was trying to get some stuff set up on it, I edited /etc/hosts and /etc/init.d, and I'm worried I might have messed ...
1
vote
1answer
144 views

How to install wine via brew?

I am trying to install wine via homebrew on Mac OS Mountain Lion 10.8.4. $ brew install wine Error: wine dependency jpeg not installed with: --universal How do I resolve this?
0
votes
1answer
64 views

SSH from osx to osx and then use agent

I have a mac at home and a mac at work. The work mac is setup for ssh to all work related servers. Sometimes I have to connect from my home mac and access the servers which are setup on my work mac. ...
1
vote
2answers
307 views

How to fix weird vim polluting the terminal behaviour on arrow keys and on delete in insert mode?

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the ...
1
vote
0answers
111 views

Scheduling cronjobs at specified time

I have scheduled some jobs in crontab which are to be run one by one, at some specific time. My script for crontab is : 15 10 * * * /Users/sri/files/BatchFF.sh 45 11 * * * /Users/sri/files/BatchGC.sh ...
11
votes
2answers
506 views

How to keep dotfiles system-agnostic?

Due to work I have recently started using OS X and have set it up using homebrew in order to get a similar experience as with Linux. However, there are quite a few differences in their settings. Some ...
0
votes
2answers
239 views

Recover Linux ext4 partition formatted to hfs+

I have a Linux partition formatted to ext4 and I accidentally formatted it with Mac OS X Disk Utility to HFS+ (Mac OS X Extended Journaled). I tried to recover it with http://www.r-studio.com/ on ...
1
vote
2answers
130 views

mlbackup / rsync / hard links data size

I am new to mlbackup/rsync and the concept of hard links, so I am a little confused after creating a backup data set via mlbackup. So here's the scenario: I am backing up "folder A" to "folder B". ...
1
vote
1answer
239 views

Bash script to hide/show files

I prepared a little bash script to toggle the visibility of my hidden OS X files. if (defaults write com.apple.finder AppleShowAllFiles FALSE); then defaults write com.apple.finder ...
2
votes
1answer
277 views

Sending raw video stream over network to an encoder

I'm trying to build a setup using OS X machines for streaming live video. Currently I use Flash Media Live Encoder on the same machine that is handling the video input unfortunately because FMLE uses ...
1
vote
1answer
142 views

Where would I find where an .htaccess file is located and being used on a Mac OS X Lion server that sets Basic Auth on an Apache server?

I've installed some software, namely, a continuous integration (CI) server (Jenkins) on a Mac Mini running Lion Server. The server, by default, runs from port 8080 on local host via the url: ...
14
votes
5answers
1k views

Bash in Linux v.s Mac OS

I am buying an iMac. I've been working on Linux for a long time and I do a bunch of bash scripting. I was wondering if all the bash commands and features are available on Mac OS ? Anyone has any ...
2
votes
1answer
756 views

How can I create a shortcut to resize panes in a tmux window?

I am having lots of issues with tmux in mac. Another problem I have is that I can not bind a key in my tmux.conf to be able to resize my panes. What I need is the CTRL-b: resize-pane -U 10 I currently ...
0
votes
2answers
102 views

Learning Ubuntu - Testing on Mac OS 10.7?

I'm a beginner in learning Linux. I know that there are many different distributions of Linux including Ubuntu. I consider Mac OS as a distribution of Linux, is that right? My goal in learning Linux ...
0
votes
0answers
205 views

lrzsz doesn't working in my Mac OS X

When I was used secureCRT in Windows, I often used sz and rz to transfer files between my linux server and client machine. But I can't use that way in iterm2 in MacOS X. lrzsz package has installed ...
6
votes
6answers
8k views

How can I page up or down in tmux with Terminal.app?

I have tmux installed. But I can not scroll up or down. I.e. as soon as I tmux I get only a portion of the screen and can not scroll up. crtl-b + Page Up does not work since I am in Mac and I can not ...
1
vote
2answers
1k views

Show human readable file size in du [duplicate]

I'm using this command to determine which directory is eating my disk. du -sk * | sort -n How can I get human readable result form du for file sizes? I've checked man and all it have is -k flag ...
0
votes
1answer
1k views

Trying to open a GUI from a remote server using Mac but not succesfully

I'm brand new user in MacOSX. I'm using ssh to connect to some Linux servers. I'm trying to open a GUI locally for a process running in the remote Linux server. So I read that I should install ...
-1
votes
1answer
110 views

How to use colors/colorschemes/fonts in vim effectively so that the text is as readable as possible

I am trying to be more productive in vim and as part of this I am trying to make the text presentation i.e. colors etc as nice to the eyesight as possible. Although I managed to change the default ...
2
votes
2answers
549 views

Key mappings in Linux

What do people mean when they point out that the "keys are not properly mapped" in a Linux installation when working on the command line? Isn't the default installation OK? What extra/specific ...
4
votes
2answers
38k views

How to install apt-get or YUM on Mac OS X

I am new to Mac OS command line, I want to use either of apt-get or yum. Can anyone help me to install them and make them successful running?
2
votes
1answer
132 views

Is it alright to have two PATH variables in .bash_profile

I am trying to setup Metasploit on osx 10.7, but I need to edit my .bash_profile and I noticed something unusual to me. I have been reading about setting the environment variable on ...
1
vote
1answer
113 views

ipfw on Mac OS X 10.8

I'm trying to setup local transparent proxy with ipfw and squid and ran into some problems. I have a single rule 00100 fwd 127.0.0.1,3128 log tcp from any to any dst-port 80 but it either gets into ...
0
votes
1answer
200 views

MAC bash commands stop working properly

I was trying to install some stuff for scala development on my MAC, and probably I managed broke the shell/terminal while I was mindlessly running some scripts that I don't know. Now when I start the ...
2
votes
0answers
105 views

Shorter timeout on I/O errors MacOS X

How do you set a shorter timeout value for read/write I/O errors on MacOSX? We tend to get a few semicrashed disks and want to rsync the contents to a secure location, but when the file subsystem ...
1
vote
2answers
665 views

A simpler way of comparing md5 checksum?

After downloading a file that has a md5 checksum available I currently check it with md5 *file* | grep *given_checksum* e.g. md5 file.zip | grep -i B4460802B5853B7BB257FBF071EE4AE2 but it seemed ...
0
votes
2answers
510 views

Defragment a USB flash drive on Mac OS X

I frequently create bootable flash drives and many a time large files need to be defragmented in order to boot. On Windows I'd used Contig/WinContig, but I must use OS X for the same purpose now. Are ...
0
votes
1answer
229 views

Errors building XScreensaver for X11 (and dependencies) on Mac

I'm building XScreensaver (the X11 version) on Mac OSX and I get the following errors while building/compiling it and its deps. XScreensaver terences-imac:xscreensaver-5.21 MAU$ make gcc -pedantic ...
1
vote
2answers
689 views

Moving compiled assembly code to the boot sector of a USB device

I have written a simple operating system and I am trying to test it. I have VirtualBox installed and an eight GB flash drive, so I thought I would just use those. I am not sure how to make the USB ...
0
votes
1answer
191 views

Problem building GPG

I'm having a problem building GPG on my system; when I try to run make it fairly well before it suddenly bails out with an error. Here's my latest result from running it: make all-recursive Making ...
1
vote
1answer
142 views

Is Mac OS X really SUS compliant?

Internet says that Mac OS X 10.8 has achieved certification to The Open Group UNIX® 03 standard and that it is a compliant system. But a simple test with echo seems to indicate otherwise:  a) The ...
3
votes
1answer
633 views

sudo: unable to initialize PAM: No such file or directory

While trying to build the NumPy Python math module with Intel's Math Kernel Library (MKL) on OSX 10.8.3, I was running into some problems with the Accelerate and vecLib frameworks overriding the MKL. ...
3
votes
1answer
68 views

stat on an encrypted volume in osx takes a long time

My workstation is a MacBook Pro with an SSD. For security reasons, my main volume is encrypted. I ran this command on a folder: time find . -exec stat {} + >/dev/null real 0m5.205s user ...
1
vote
0answers
299 views

Convert ASCII-8BIT to UTF-8 using OSX' .bash_profile

When running certain rails scripts in OSX' Terminal, I get warnings such as the following: unable to convert "\xA9" from ASCII-8BIT to UTF-8 for ...