Tagged Questions
0
votes
4answers
115 views
bash execution time in milliseconds (mac osx user)
I've checked this , but the solution provided did not work for me.
Using date I can get the execution time in seconds:
T="$(date +%s)"
#some work here
T="$(($(date +%s)-T))"
echo "execution time ...
0
votes
1answer
16 views
Modify Several Plist Using a Script
defaults read /New.plist itemName
the Output Will Be Some Thing Like "Software"
but i want the new Data to be updated for the key as "Software Old Version"
the problem is i have to modify several ...
0
votes
1answer
33 views
Backup bootable USB flash in Mac OS X
I have a bootable USB. It runs Linux. The size of USB pen is 8Gb, and linux partitions take less than 200Mb.
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE ...
0
votes
1answer
63 views
Memory usage classification under Darwin (Mac OS X 10.8)
on Mac OS X using Memory Clean, I can behold this memory usage stats chart:
While the meaning of active and free seems to be clear, what do "wired" and "inactive" memory refer to?
0
votes
3answers
111 views
Find and replace string in a list of filenames
I have a couple of files like so, (on Mac OS X):
product-103-footer.tpl
product-103-header.tpl
product-103.tpl
I want to replace '103' in all the filenames with something else using grep and sed, ...
1
vote
1answer
77 views
OS X - make ordinary SSH commands use SSH config
Here is a (somewhat redacted) listing of my ~/.ssh/config under OS X 10.6.8 Snow Leopard:
Host *
IdentitiesOnly yes
Host foo1
IdentitiesOnly yes
User foo1
HostName example.com
...
1
vote
2answers
51 views
How to restore Unix terminal
Some times my Unix terminal gets destroyed, either by:
I can type commands, but characters are not echoed on the screen. When I press enter, the prompt is printed on the same line as the current one ...
1
vote
1answer
424 views
What does exec $SHELL -l do?
By accident, I ran the command
exec $SHELL -l
in my terminal, and it changed how my prompt looks
Macintosh:~ myname$ exec $SHELL -l
Macintosh-2:~ myname$ cd
i.e. there's a "-2" after Macintosh
...
-1
votes
1answer
77 views
unix commands to delete files in different folders
Homebrew has given me some warnings and told me to delete certain files from both /usr and /Library folders, which are getting in the way certain installs. Is there a way to remove these files from ...
0
votes
1answer
363 views
Mac OS X terminal and PATH variable
I've added PATH variable definition to my ~/.profile file:
Here it is:
export ...
1
vote
2answers
452 views
How can I find out how many hours a hard drive has been running (powered on hours, or POH) on Mac OS X?
Where can I view hard disk usage stats on Mac OS X? Specifically it's a SMART enabled SSD (Crucial M4). But hopefully this command and/or app will not be so picky with drive type.
CrystalDiskInfo ...
0
votes
2answers
53 views
Taking a file from my terminal window and store it on my mac
I am a little confused on how i am suppose to get a file from my terminal window on my mac that I want to have/need to use on a different applicatopn (APLX) in order to edit this file. I was wondering ...
0
votes
0answers
222 views
ipfw to redirect traffic from port 80 and 443 to 8080
-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8080
-A POSTROUTING -s 10.0.10.0/24 -o ...
0
votes
1answer
75 views
Python by default on all unix systems? [closed]
There was a discussion on which language to choose for a system checker. The system checker is supposed to be a script running on unix systems.
On Gnu/Linux systems seem to always have it installed ...
1
vote
1answer
67 views
Do I need to recompile command-line utilities after upgrading Mac OS X?
This is probably a trivial question, but I have the GNU coreutils installed, along with many Python packages and some other things. I was expecting that I may have to re-compile or re-install ...
0
votes
1answer
146 views
How do I type numbers in vi?
Sometimes when I have to do basic editing of a file or write a basic script when I'm working in Terminal, I use vi. The problem is that when I type numbers, it goes to that line. Is there a way to ...
1
vote
2answers
1k views
Mac server default file permissions
How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there ...
0
votes
1answer
265 views
Colors in zshell prompt cause odd behavior
I'm running OSX Lion 10.7.3, zsh version 4.3.11. I've found that if I have color escape codes in my prompt, it royally screws things up. For instance, if I scroll forward through the command history ...
0
votes
1answer
94 views
Open Firmware - RAM Size
Is there a command to get the amount of RAM in Open Firmware mode (Cmd + Alt + O + F on startup)?
3
votes
3answers
330 views
Mac- or Unix-compatible utility to compute and compare LAME MusicCRC in MP3s?
The LAME encoder stores a CRC16 checksum of the audio stream in the header of every MP3 it encodes. The 'actual' audio checksum can then be computed and compared to the original value at a later date ...
2
votes
1answer
171 views
Trouble installing OpenCOBOL
When I ./configure, I get this error:
configure: error: libdb is required
I signed up for an Oracle account (yak shaving), downloaded Berkeley DB, untarred and unzipped, wrestled with the unhelpful ...
0
votes
1answer
126 views
PC vs Mac… why are things this way? [closed]
Why is it that you can run all sorts of operating systems on PCs (such as Linux, Windows, UNIX, BSDs, etc) but can't run Mac OS / Mac OS X?
Conversely, why can't you run anything but Mac OS / Mac OS ...
2
votes
1answer
598 views
Why won't my bash script work?
I'm getting more comfortable with the terminal in Mac OSX and I thought I'd have a dabble at bash scripting. Not wanting to crawl before I could sit down I wanted to write an incredibly simple "Hello, ...
16
votes
5answers
3k views
Does dual-booting an OS require a dual-core processor?
My friend claims that dual booting, using two different OSes, requires a multi-core or multi-threaded processor. Is this true?
And if I install additional OSes, will my computer slow down any?
0
votes
3answers
2k views
executing unix code from the terminal
I have a directory on my hard drive that contains a collection of Unix executable files that I am trying to run from the terminal. When I browse the directory from the terminal it shows all the files ...
0
votes
1answer
133 views
Quickest way to learn the useful terminal commands [closed]
I'm an iPhone developer but surprisingly (even to myself) I am completely unfamiliar with terminal. The only things I know how to do are cd, ls, top, kill and the git commands for setting up ...
0
votes
2answers
441 views
Allow internet connection through nothing but a certain VPN connection in Mac OS X
How can I configure Mac OS X such that it can only allow an internet connection (both downloads and uploads) through a given VPN connection?
If the VPN connection disconnects, the internet should ...
3
votes
3answers
2k views
What is the difference between Linux (Ubuntu) and Mac shell commands?
I use Ubuntu at work and a Mac at home.
I was trying out some shell commands on my bash terminal on the Mac today but they didn't work. I was told both machines should operate UNIX commands so the ...
2
votes
0answers
39 views
how do I source control my color profiles? [duplicate]
Possible Duplicate:
How to keep my OSX settings under version-control ?
I switch between a bunch of Mac and Linux machines at work/home.
On my Personal Mac, I have setup TextMate, iTerm, ...
2
votes
1answer
1k views
Launchd execute command when folder contents modified or changed
For the past two days i've been trying to get a launchd plist to execute a script "program" when the contents of a folder on my desktop contents have modified or changed. I've gone through tons of ...
1
vote
2answers
110 views
How \ why does echo $'\ec' work? What is it doing to clear the terminal?
On the terminal prompt for OS X I can type in echo $'\ec' and ti will clear the console. I have no idea why this works, though. What is it doing?
I'm guessing this would work on other versions of ...
1
vote
0answers
2k views
remove dir with files not working
I'm trying to remove this directory pear from my tmp folder, but it's not letting me.
I tried
sudo rm -r pear
But then it asks me to override, and I put y and it says Permission denied. Any ideas ...
1
vote
4answers
1k views
How can I find the PID of a process using its command line arguments?
I'm using Mac OS X, which means I don't have (for example) pgrep/pkill, but I want something like that (I don't use macports/fink, either - homebrew is my Unix package tool of choice - so packages ...
1
vote
1answer
185 views
Where do I put a certain alias to always work in a terminal in MAC?
On my linux system (ubuntu), when I create a certain alias in ~/.bashrc and then restart the terminal/system, the alias always works again, without reloading anything.
But on my MAC system, when I ...
3
votes
3answers
7k views
Connect to WiFi network using Mac Terminal
Every time I try to find out how to do this, I find out how to do it on a linux, and it doesn't transfer. How do I connect to a WiFi network using Mac Terminal Bash?
8
votes
1answer
3k views
How does one switch between windows on VIM?
I'm using both Vim and MacVim (or well, trying to). I installed the Tagbar plugin but find it impossible to switch to the actual Tagbar window to make my selection.
I've been reading loads about ...
12
votes
4answers
13k views
What's the difference between .profile and .bash_profile, and when do you configure which? (Mac) [duplicate]
Possible Duplicate:
Difference between .bashrc and .bash_profile
What's the difference between .profile and .bash_profile, and when do you configure which?
I.e if I configure the ...
4
votes
5answers
486 views
Why do we use ./progname in *nix systems to execute a program?
I've been using Linux & Mac for sometime now and I always wonder - Why do we have to execute a program like ./progname . I know Unix treats every thing as a file and it stores the filename in a ...
0
votes
1answer
107 views
Weird behaviour on OS X, colour wheel of death, impossible CPU time?
My computer has been experience some weird issues. Doing almost any simple operation in a significant application like Sarafi results in the appearance of the colour wheel of death. Most of the time ...
0
votes
1answer
497 views
getcwd Error throughout System
I seem to be getting a getcwd error suddenly throughout my system. Thoughts anyone.
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
...
1
vote
4answers
434 views
Besides ls, cd, mv, cp, chmod/chown, sudo and vi, what are the most useful command line utilities to master? [closed]
Using Bash, but any shell is fine.
3
votes
1answer
976 views
How do you use “sips” at the terminal to resize an image, without upscaling?
I have some code that I've been using to resize images in Mac OS X via the command prompt (and/or quicksilver), to a maximum width or height of 500px. The only problem is that if the original image is ...
3
votes
2answers
1k views
What would prevent me from re-creating a missing /dev/null folder?
I noticed on my home machine (OS X 10.6.6) that somehow the /dev/null folder got corrupted. It seemed to exist when browsing in Finder or Terminal, but wouldn't accept any output written to it, and I ...
0
votes
2answers
250 views
com.apple.named.conf.proxy missing
I've seen a number of references to /etc/com.apple.named.conf.proxy for use with named in Internet Sharing on Mac OSX. On my Snow Leopard 10.6.6 Macbook Pro, though, no such file seems to exist. Is ...
3
votes
2answers
3k views
Mac dev folder missing, SSH not working
A few days ago, SSH stopped working.
Can someone help me get SSH to work (it used to)
Help me understand the UNIX dev folder
Are there any PUTTY like Mac clients.
When I try logging in with SSH I ...
4
votes
3answers
557 views
Mac OS X Linux Unix version
What Linux or Unix version underlies Mac OS, OS X 10.6?
Is there a good documentation for that version, specifically regarding security, networks and similar topics?
2
votes
2answers
883 views
Local port forwarding on a mac
I need to have the mac take traffic coming into it on one port send the traffic to a different but still local port.
I.e. Traffic comes in on port 1234 and transfers to port 5900 (vnc)
This is ...
2
votes
4answers
667 views
rm -rf: Unix thinks '-rf' is a file not an option
I run the following command in Terminal on my OS X Snow Leopard laptop:
rm -rf /path/to/directory
Normally, this deletes the directory and all contents/subdirectories. For some reason, though, it ...
3
votes
1answer
1k views
Finder: Open folder as another user
I just would like some simple protection of my files, and from my point of view, there's nothing like unix permissions system. Chmoding and chowning folders and files just gives me the flexibility I'm ...
1
vote
2answers
2k views
cp command not working with wildcards on Mac OS X
I am using the following command on a Mac OS X machine:
cp "/Users/username/Desktop/silverlock-dev/silverlock/../3rdparty/botan-build-desktop/src/libBotan*" ...

