1
vote
0answers
6 views

difference between tty[p,r,s][N] and pts

$ ps -ef | grep tty | grep root | grep "-sh" root 25185 25184 0 Oct 14 ttyp4 0:00 -sh root 22998 22997 0 Oct 14 ttyp2 0:00 -sh root 25379 25378 0 Oct 13 ttyp0 0:00 -sh root 1709 ...
0
votes
2answers
21 views

To prevent Finder from showing .noindex files

I can restrict Finder searching files by adding .noindex -extension, this thread. However, I want hide those files in Finder search. How can you prevent Finder from showing .noindex -files?
0
votes
1answer
48 views

Completely restore root and home folder after many problems with Macports and Homebrew

I had a long day battling with installing a LAMP environment with Macports. I installed several things, had many problems, tried uninstalling them (not sure if I did), and on and on. Then, I tried ...
6
votes
6answers
439 views

How to prevent the application launched in Terminal from undesirably exiting?

I launch applications from the Terminal with commands like this one : /Applications/Mail.app/Contents/MacOS/Mail & The important part is the &. For Unix / Linux / Solaris : I have ...
0
votes
1answer
302 views

Whats the equivalent of the unix tree command on OSX

Whats the equivalent of the unix tree command on OSX (10.8.5)
1
vote
1answer
21 views

grep doesn't give the correct offset?

Trying to get the bytes offset of a text word in a binary file (with some text here and there). I need to know the offset of this word from the beginning of the file. I'm wondering if on osx the ...
0
votes
0answers
27 views

Convert absolute symlinks to relative ones?

I've seen plenty of threads on the Internet about doing the opposite, but what I want to do is, given a folder: /Lib/Foo/Bar.framework/Versions/1.5 And a symlink to it: ...
2
votes
0answers
59 views

Why is Terminal.app corrupting my tcsh history?

I've had an ongoing problem that appears to be specific to OS X and Terminal.app: periodically, I get garbage in my tcsh history that looks like this: ^[[1m^[[4mcomputername:~/Code/emacs-source ( ...
0
votes
4answers
151 views

How to get to know OS X/Unix better? [closed]

Not sure how to ask this but this problem has troubled me for so long. I'd long been a DOS/Windows user until about 12 years ago when Mac OS X first came out I turned to the Mac, and stayed here ever ...
1
vote
1answer
1k views

How to patch a file that resides in /Applications (patch can't find file to patch at input line)?

I am trying to patch 5 files within an Mac application bundle using the Terminal patch command. The files to be patch are specified using an absolute file path (the file name and path start with a ...
0
votes
0answers
13 views

Command Line Tips and Tricks [duplicate]

==>> What are the most useful Unix shell "one-liners" that you use? <<== Here are a couple of mine to get the conversation started: 1. Repeat the previous command with a substring replacement: ...
1
vote
2answers
795 views

Symbolic links, why doesn't this work:

me$ ln -s ~/x/y/ ~/Desktop/ ln: /Users/me/Desktop//: File exists Why does this attempt at creating a symbolic link to ~/x/yon the Desktop now work? The only way I can seem to get something like a ...
1
vote
1answer
121 views

System event key codes not working on thunderbolt display

My AppleScript works when I am just using my MacBook Pro Retina, however if i have my Thunderbolt Display attached the script does not work. Here is the script which works perfectly on just the ...
2
votes
1answer
2k views

How to update Python on a Mac with Unix commands

After giving up on doing a disk partition and getting Linux, I decided to try and install Python 3.3.2 on a 32 bit Intel Core 2 Duo iMac with OS X 10.6.8 Snow Leopard. I did pretty much everything the ...
4
votes
2answers
2k views

How to strip a filename of special characters?

I have a file with a name such as "Today's Date.txt" What I am interested in is stripping away all special characters using the terminal such as: " - , ' ' [ The reason for this is because I ...
2
votes
1answer
305 views

Where should shell tools be installed?

Are there Apple guidelines for where user shell tools in Mountain Lion should be installed? Some (e.g. TeX, or Apple's Git) end up in /usr, and others (e.g. X11) seem to end up in /opt (sometimes with ...
4
votes
2answers
5k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
1
vote
1answer
292 views

How to use a UNIX console app

I downloaded a port knocking script from http://www.zeroflux.org/projects/knock It downloaded a file knock, which is a Unix Executable File. When I double click on it, it runs the Terminal, where it ...
3
votes
3answers
19k views

How do I delete a BootCamp partition using Terminal's diskutil?

For some reason, the BootCamp Assistant app won't let me delete my BootCamp partition. How can I do so using Terminal and the diskutil terminal app?
0
votes
1answer
1k views

How can I have Qt Creator to recognize my environment variables?

I use Qt Creator as my main IDE for cross-platform C++ application development. In doing so I had set it up so that it depends on a set of environment variables that I define in .bashrc. On Linux ...
1
vote
1answer
1k views

How do I get a Unix Executable File to run from anywhere, like Java or Git?

I've just created my first Command Line Tool in Xcode. What do I have to do, or where do I have to put the final output file, so that I can run it from anywhere from within terminal, without having ...
2
votes
1answer
424 views

bash file recovery?

I think I messed up my bash file /bin/bash when trying to create my first script, it displays a message saying "process completed" and locks my terminal, if I switch to another shell e.g sh, then it's ...
9
votes
1answer
3k views

What is the difference between the sudo and su command?

What is the difference between the sudo and su command? Why does OS X handle these different than Linux?
2
votes
3answers
244 views

What tools exist to recover a file I clobbered using cpp in terminal?

I accidentally typed cpp Scriptname.py DestinationDirectory, intending to copy the Python script into the folder. I realized afterward that I should have used cp, but now my Python script is ...
3
votes
4answers
9k views

How do I search all hidden files that are in hidden folders using Terminal?

I need to find some configs buried in some hidden folders and can't recall where they are to navigate to them directly Cmd+Shift+G. I did a sudo find -name Foo* (slow), but none of the returned files ...
8
votes
4answers
3k views

Remotely SSH to IP address in home network

I've got a device at home I want to SSH to from work. The device has port 22 open locally and I have port 22 opened on my AirPort Extreme. However, on the AirPort Extreme it says the open 22 port only ...
1
vote
2answers
242 views

How can I get Unix (brew/xcode/vim) acting like Unix under Lion?

I "upgraded" from Snow Leopard with Homebrew and vim both chugging along happily, to Lion. Now vim hangs/segfaults, and when I invoke brew, it complains xcode is missing, and continues to do so after ...
3
votes
2answers
716 views

SSH Key Error, sudo works fine

When I try to ssh (using ssh user@server.com) into my server at home from either the local network or from outside, I get the following error: But if I use sudo ssh user@server.com, it works with no ...
2
votes
2answers
218 views

Where do these Terminal commands come from?

I don't know any specific term for these Terminal commands, so i want to give an example: defaults write com.apple.dock itunes-notifications -bool TRUE With this command, you can enable an ...
5
votes
2answers
507 views

Is there a UNIX-style triple click to select path in Terminal.app?

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste. This doesn't ...
4
votes
4answers
615 views

Setting time format preference in unix (Mac-Terminal)

I'm learning to work in unix using Terminal on a Mac and I'd like to set the default listing for the timestamp to display in 12 hour time, using AM and PM, instead of 24 hour time (ie: 1:00 PM, not ...
6
votes
3answers
3k views

How can I manipulate several security settings from terminal?

I want to change these behaviors from terminal: Auto-login Showing password after screensaver and sleep mode Go to sleep mode after x minutes Enable screensaver after x minutes
1
vote
1answer
361 views

Map keyboard key to unix command

Simple I am looking for a way to map a keyboard key to a unix command. It could be as simple as literal as opening up terminal and pasting a required bit of text.
3
votes
1answer
3k views

Unknown terminal 'xterm-256color'

Keep getting a message in Terminal saying tput: unknown terminal "xterm-256color" This message typically appears when running homebrew, and while I can swear it's popped up on other places, I ...
4
votes
1answer
2k views

How can the 'mail' command be used?

I've had my first Mac for about five months now. Though, even when I was a full-on Windows user, I never did things through a command line; I was pretty much for the GUI all-the-way.. But now that I ...
2
votes
0answers
542 views

Why does my Terminal window close automatically?

I need to use my Terminal window on a MacBook Air but it closes about 10 seconds after I open it. Is there a setting or is it possible another program is causing it to close? If I type quickly I can ...
9
votes
9answers
654 views

Which command-line packages do you need? [closed]

I generally have one of Fink, MacPorts, Homebrew installed. Most often for a single, small, and trivial package. I've found that all my day-to-day software exists in OS X versions. So, which non-OS X ...
10
votes
7answers
13k views

How to monitor file access for an OS X application?

I am looking for the OS X corespondent of FileMon, that was later included in ProcessMon. BTW, it is essential to be able to filter by process.
0
votes
1answer
2k views

Git: command not found during Git installation (Mac OSX 10.6)

I am trying to install Git on my Mac (OSX 10.6) following the official Git tutorial. I had no problem until I had to set my username and my email. Every time I tried I got "-bash: git: command not ...