Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.
0
votes
0answers
85 views
GDB (GNU Debugger) with TUI (Text User Interface, or 'layout' command) on Maountain Lion
Anyone who has tried GDB's nifty layout interface must be impressed by its convenience. Unfortunately, however, Apple developers never realized this, so Xcode, even with its optional command line tool ...
3
votes
1answer
169 views
Using the apple wireless keyboard with an iPad with PC/Mac-like keyboard commands
I have jailbroken iPad2 (iOS5.1.1) and an apple wireless bluetooth keyboard that I use for typing on the iPad. Although the keyboard is a joy to use, I can't use it for much else other than typing ...
2
votes
4answers
1k views
How to run Wireshark in the background without the GUI?
I am trying to run Wireshark on Mac OS X in the background. I installed the command line utilities, and so I am able to start Wireshark and capture packets using the command line.
The only thing I ...
9
votes
4answers
3k views
Changing a file or folder icon using the Terminal
How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
5
votes
2answers
313 views
“Airplane Mode” in OS X. Alternative command for `rfkill`?
This question is an exact duplicate of this post from
superuser.exchange.com. I believe this is a valid question for both of sites
and hope I am not (if any) violating stackexchange policies.
...
1
vote
3answers
125 views
Can I list files ordered by date added to a folder from a command-line tool like ls?
I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls.
Any other way to ...
1
vote
2answers
1k views
Restore disk in single user mode
I wounder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe ...
0
votes
0answers
22 views
hdiutil(1) and I/O errors: how to debug with “ifd-ignore-io-errors” = 0;
Observation
Debug output from hdiutil (example) typically includes
"ifd-ignore-io-errors" = 1;
In that context, I guess the 1 means that I/O errors are ignored.
The question
If that guess is ...
0
votes
1answer
267 views
How do I install handbrake cli?
I've downloaded the Handbrake CLI. What's the best place to install a command line app on my Mac?
0
votes
1answer
56 views
How can I get tab completion back?
In terminal, if I try tab completion in a directory e.g. Movies, instead of the movies beginning with S (if I type S followed by tab, I see SetFile, Splitforks and SystemStarter. I suspect I installed ...
2
votes
0answers
64 views
“df” command making network requests?
I was watching Little Snitch for another process, and noticed df was making requests to various servers. I thought df was only for checking free disk space locally, but it appears to be doing more ...
1
vote
0answers
595 views
How do I force a partition and format on a USB key in OS X Mountain Lion Disk Utility or from CLI diskutil?
I have a brand new Memorex TravelDrive 64GB USB disk which is being troublesome.
It's formatted FAT16 on MBR, which is not so nice, and I'd like to put it on HFS+.
I've tried to do this through ...
2
votes
1answer
2k views
What steps are needed to create a new user from the command line on Mountain Lion?
What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh.
It looks like an existing pair of answers might work, ...
0
votes
0answers
93 views
Adding Ricoh C4501 printer via command line - Installable options
I need to deploy one Ricoh MFP to ~50 Mac users. I thus wan't to do this through ARD/CLI. I'm looking for the correct lpoption tags for the Ricoh MP C4501. I want to set the "Finisher" (SR3020) and ...
4
votes
1answer
691 views
Child process exited with status 254 error when extracting a tar.xz file
I'm trying to extract a tar.xz file with tar in Mac OS X Lion. I'm using bsdtar 2.8.3 - libarchive 2.8.3. I'm able to use tar to extract anything else I've tried (.zip, .tar, .tar.gz, etc.), but when ...
4
votes
2answers
1k views
How do I change the time format used by ls command line on osx?
I want to make ls display time in ISO format (military format). How can I change this behavior?
On Linux I knew that I could force ls to display time in long format by usin --full-time but this ...
2
votes
1answer
103 views
Paste <TAB> into Mac OS X command line
I want to paste <TAB> into command line, in order to execute cut command with <TAB> as the delimiter. Everytime I try to do it, it simulates clicking the tab key and completes the command ...
8
votes
3answers
512 views
Copying files to the clipboard using applescript
Often I find myself at the command line wanting to copy files to the clipboard, so that I can paste them as attachments in Mail. If I have an image file, image1.png, I can accomplish this with
...
2
votes
1answer
84 views
Why do debuggers need an admin password?
Why does running LLDB or instruments require elevated privilages?
1
vote
2answers
286 views
Display dialog from command line (like xmessage does)
Background
I'd like to be able to display a notification window in OS X from within a script. The script will be running in background, so the notification should not go to the terminal but instead ...
1
vote
2answers
94 views
Use Cmd as Ctrl key in vim
How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
1
vote
1answer
55 views
Backing up individual files with encryption
In addition to local Time Machine backups, I would like to automatically backup my working data from my Macbook to a remote FTP space. Because it's a location I don't control and sensitive data, I ...
1
vote
1answer
3k views
Create new partition in unallocated space with diskutil
I have deleted the first partition on my external HD such that it now has 100GB of free space at the beginning of the partition. I'd like to reclaim that space, but Disk Utility doesn't let me create ...
6
votes
1answer
204 views
Incorrect Terminal.app output for long lines with tabs
When I run the following command in Terminal.app:
echo -e "a\tb\tc\td\te\tf\tg\tyo"
I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
4
votes
2answers
334 views
What is the preferred method of command line domain name lookup (DNS)?
What command line command do I use to lookup a domain address?
When looking at the man pages for nslookup and dig I can see a section saying that these utilities do not use the Mac OS methods of ...
1
vote
0answers
216 views
Is it possible to download Apple's Command Line Tools for Xcode from the command line?
Background
My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
8
votes
2answers
752 views
Can user accounts be managed via the command line?
Is there any way to add, remove, or modify user accounts via the command line? I'm not talking about an account for a system process or daemon, I mean is there any way to add a user account, change, ...
2
votes
3answers
275 views
How to determine the absolute path to a file in a shell script
I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files.
I need a fail-safe way to turn all those passed paths into absolute ...
10
votes
1answer
268 views
Why is lsof on OS X so ridiculously slow?
I can't figure out why lsof on my Mac (10.8.2, MacBook Pro) is so slow.
On my Mac, lsof takes more than a minute:
$ touch /tmp/testfile
$ time lsof /tmp/testfile
real 1m16.483s
user 0m0.029s
...
2
votes
1answer
213 views
How do I emulate Internet Sharing from the command line?
I'm trying to set up my Macbook Air to share an OpenVPN connection for use while I'm on the road and don't want my iOS traffic to go over the open Internet. Sadly, Mountain Lion's Internet Sharing ...
1
vote
0answers
26 views
How to install Writer2LaTeX in command line
This is the app I want to install, in ubuntu it was done automatically, but somehow in Mac it seems that I have to install manually.
Writer2LaTeX
http://writer2latex.sourceforge.net/
In the ...
0
votes
0answers
19 views
How can I toggle internet sharing from the command line? [duplicate]
Possible Duplicate:
Start/stop internet sharing from a script?
There are applescripts / automator scripts that help to turn on / off internet sharing, but they do not work consistently ...
6
votes
2answers
7k views
How to download command line tools in xcode 4.5
I just installed xcode 4.5 and need to install the command line tools. The apple documentations says (with very little detail) that there is a download section in the preferences pane. I have yet to ...
2
votes
6answers
552 views
Improved Terminal autocomplete funcionality (similar to Matlab's)
If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal.
It works like ...
0
votes
1answer
902 views
Is there a Mac OS X equivalent of the Linux iwconfig command?
I'm looking for a command line tool in Mac OS X that performs the equivalent of the iwconfig command in Linux.
Example:
kirkland@x220:~/src/byobu/byobu$ iwconfig wlan0
wlan0 IEEE 802.11abgn ...
0
votes
1answer
67 views
Set Keystroke for Service from Terminal
I created some services to be used in Finder. Now I wanted to create some keystrokes to call these services. That would be easy in the System Settings, however, I would like to add them from the ...
3
votes
1answer
310 views
Is it possible to open in default browser a URL from command line reusing same tab?
I know that I can use open command to open a URL in a default browser like:
$ open http://google.com
But what I would like is to execute a similar or same command to open different URLs one after ...
21
votes
5answers
5k views
How to move files to trash from command line?
I do a lot of terminal work, and today had the experience of typing
rm fileInQuestion.txt
Before finding out that I did actually need fileInQuestion.txt. If I'd deleted in the GUI then I would have ...
0
votes
1answer
56 views
Bug in 'file' command on 10.5.8? (Or am I doin' it wrong?)
On my OS X 10.5.8 system, the man page for 'file' says:
-h, --no-dereference
option causes symlinks not to be followed (on systems that support symbolic
links). This is the default if ...
0
votes
0answers
103 views
Mounting a Flash Drive in Single User Mode
I am planning on copying over and viewing some files on a Mac of mine, namely they are in the system folders. I have done a TON with the UNIX command line, and I am acquainted with Single User Mode. ...
1
vote
1answer
65 views
What's the difference between device file and its raw version?
It's convenient to use dd to write image file to USB sticks. But I find sometimes people write dd of=/dev/disk1 and there is alos dd of=/dev/rdisk1.
e.g.
The arch wiki
dd if=image.iso ...
2
votes
2answers
148 views
How to drop a file onto a GUI app from command line?
I've got a tool to normalize WAV audio files, but it only works by dragging and dropping the file either onto the GUI or onto its dock's icon.
As far as I know the app doesn't have any option to pass ...
0
votes
0answers
83 views
Use asr and/or mount to image a mac with a dmg located on a network machine
I don't have OS X Server and want to image a mac over my network. I've been attempting this through the terminal inside the recovery console (can't boot into the OS). I have the dmg which I packaged ...
3
votes
1answer
147 views
Within Terminal, `date` command outputs a curious prefix where it should'n
I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command
date +%s
...
0
votes
2answers
270 views
How to set alternatives in 10.8?
On Linux you can use update-alternative to change the version of a command.
Which command in OS X (10.8) will switch the alternative of the current command?
4
votes
4answers
1k views
Monitor a folder for changes, and run a command when a change is detected
Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder?
This should be possible via the command line, or a system built-in application, no ...
3
votes
1answer
493 views
How can I add reminders via the command line?
Once in a while it may be useful to add some reminders to Reminders.app from the command line — especially because they are synced to iCloud. Is there any way to do so?
A solution that does not rely ...
1
vote
0answers
142 views
Resource efficient way to monitor file change and execute shell scripts on change
I know at least three ways to monitor a folder/file for changes and execute a shell script on change.
First, use "Folder Actions" of Automator
Second, the launchd.plist approach but it seems the ...
3
votes
4answers
920 views
Temporary files listed by lsof don't exist
I like copying flash videos for offline viewing later. I used to do this by loading the video in the browser (Firefox or Google Chrome), then running this command to see where the flash file was being ...
2
votes
1answer
217 views
Why doesn't tar recognize .iso files, even though the documentation says it should?
man tar says that OS X's tar implementation should be able to extract .iso files.
tar creates and manipulates streaming archive files. This implementation can extract from tar, pax, cpio, zip, ...





