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.

learn more… | top users | synonyms (1)

2
votes
3answers
1k 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 ...
2
votes
2answers
2k views

Is there a free command line program for converting PDF files to SVG?

Once upon a time I used Corel Draw to edit vector graphics. Now I'm looking at using Sketch. I previously converted all my old CDR files to PDF but Sketch doesn't seem to like to open PDFs containing ...
2
votes
2answers
236 views

How to investigate fragmentation of one file?

I'd like to see if one of my file is "all over the place", ie fragmented in little pieces at different locations on my hard drive. I'm not looking for a software like iDefrag but rather a command ...
2
votes
1answer
609 views

How can I kill or refresh Desktop Wallpaper with a Terminal command?

Is there a command for refreshing the Display Settings? Or, in specific, refreshing the Desktop Wallpaper?
2
votes
3answers
495 views

Editing iPhoto-specific metadata

Perpetua:2011-01-16 ashley$ mdls IMAG0107.jpg ... kMDItemComment = "Cat with is tongue out." So, here's my question. xattr can be used to modify some ...
2
votes
1answer
54 views

How -exactly- do I remove a specific directory, from my PATH, in OSX, Mavericks?

Ok - so this issue has become somewhat of a white whale for me. I have browsed some of the questions here, but I cannot seem to figure out how to, very simply, delete a directory from my PATH. (I ...
2
votes
1answer
47 views

Adding a username alias using the command line

How do I add a username alias using the command line? I can do it fine using the preferences dialog through the "Advanced Options", but I need to do it during an installation script. Can someone ...
2
votes
1answer
241 views

Use find in Terminal to remove directories and files of same search parameter

If I type the following into Terminal, it will remove all files that meet the search parameter: sudo find . -type f -name "*Xilisoft*" -exec rm -rf {} \; Then if I start again and type it with d ...
2
votes
1answer
152 views

UTF8 filenames and shell utilities

Try the next commands from the terminal: touch á.txt $ ls á.txt find . -name á.txt -print prints nothing. My Terminal.app settings are utf8 - see here: The question: How to achieve to work ...
2
votes
1answer
260 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 ...
2
votes
1answer
188 views

Why do debuggers need an admin password?

Why does running LLDB or instruments require elevated privilages?
2
votes
2answers
490 views

Exclude files from “central metadata store”

I'm fairly familiar with the mdfind utility. I find it's very useful when I can't find a file or when I need to find a file with certain contents. The problem is that I need to exclude some files from ...
2
votes
1answer
494 views

Why doesn't the screen command source my .profile?

When I start a new screen, the aliases that I have set in my ~/.profile do not seem to be sourced. Does anyone know where I can change this or which file is actually read when starting a new screen?
2
votes
1answer
1k views

Open source iSightCapture?

Is there an open source program like iSightCapture?
2
votes
1answer
205 views

How can I run a shell command at login time without showing a Dock entry? [duplicate]

Possible Duplicate: How to run something automatically when the system boots or a use logs on? I need to automatically run a command when I log in but I don't want to add an item to the ...
2
votes
1answer
177 views

How to boot OSX into desktop from single mode?

Is there any possibility to boot graphical mode once I'm in single mode (CMD+S on boot time) logged as root? Related: http://www.mactalk.com.au/11/90219-boot-into-desktop-single-user-mode.html ...
2
votes
1answer
68 views

How can I move fast in CLI in Mac?

In linux in CLI I can press ALT + F or ALT + B to move back and forth in terms of words and not one character at a time. Is this available in Mac? There is no ALT and I tried Control + F, Fn + F, ...
2
votes
1answer
364 views

Fixing two user groups with the same ID

Suddenly, my home directory is in the group messagebus instead of the usual staff.(I blame texlive for this, but have no evidence.) The problem is that both groups have the same ID: $ dscl . -read ...
2
votes
2answers
233 views

place text over image without imagemagick

I have a png image file which I would like to overlay text onto, via the command line (for use in a Makefile). The text to be overlaid is dynamic, decided at the time the image is modified. I am ...
2
votes
1answer
26 views

CLI to copy to clipboard but still output to term ?

I know that piping to pbcopy copies command line outputs to the clipboard. How can I still show the output in the terminal ?
2
votes
2answers
823 views

curl command can't be found, OSX utilities have been replaced by GNU coreutils… how to start from scratch?

I recently installed homebrew and I was having a hard time because I could not install it as curl command couldn't be found, someone pointed me to use wget and that worked to install homebrew but now ...
2
votes
2answers
5k views

Restore disk in single user mode

I wonder 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 ...
2
votes
1answer
24 views

top, group by command

Is it possible to run top and group processes by COMMAND? Seeing every single individual Chrome process not very helpful PID COMMAND %CPU ...
2
votes
1answer
38 views

Cannot seem to download command line tools

I'm trying to download and install Command Line Tools for my Mac through Xcode, but it is not in the downloads section like youtube videos tell me to go. So, I manually download it and install it, and ...
2
votes
1answer
111 views

Deleting with rm did not free up space [duplicate]

I deleted a 5gb video using rm video.mp4, but the space hasn't freed. This was the situation: while encoding a video with FCP X, I ran out of space, I only had 50 MB free. Since in the trash I had ...
2
votes
1answer
238 views

Escape character ^] not working from Mac terminal

If I ssh into an Ubuntu machine from my Mac with a "UK extended" keyboard and run telnet localhost 4730 I see: me@ip-10-xx-xxx-30:~$ telnet localhost 4730 Trying 127.0.0.1... Connected to localhost. ...
2
votes
2answers
40 views

History commands render incorrect on Bash Vi mode

I'm having this werid and really annoying issue in bash vi-mode. Env: Mac 10.9.2, iTerm 2 1.0 or Terminal.app, $TERM={screen-256color|xterm-256color|xterm|vt} Repro steps: Run some long commands ...
2
votes
1answer
103 views

cpio's file on disk is not older; skipping — how to suppress this warning?

I create shadow copies of a directory containing 50K+ images (I don't remove them from the card until they're in three other places). Every time I add images to the master, I update the shadow copies ...
2
votes
2answers
134 views

Open app in current directory when another app with the same name exists, from command line

I have an app name foo.app I want to open from command line (using open). My folder structure is like this: ~ +---bar +--- foo.app +---baz +--- foo.app I want to open the app located in ...
2
votes
1answer
350 views

Is it possible to set a Custom quick look preview image in OS X?

Is there any way to set a custom quick look image in OS X? I'd like a command line tool or applescript to change or embed a custom preview for a file using a jpeg.
2
votes
1answer
317 views

Remember desktop state after reboot

Does anyone know if desktop switching can be done programatically? Exposé activation and deactivation? I know of the screencapture command for the last part of my proposed solution. I would like to ...
2
votes
1answer
387 views

brew cask: howto uninstall an Application

I tried, while I am in /opt/homebrew-cask/Caskroom $ for i in *; do brew cask uninstall $i; done Error: appcleaner is not installed Error: avidemux is not installed Error: eclipse-ide is not ...
2
votes
0answers
30 views

Get RSS Memory usage from entire OS on command line

I need to get the entire count of RAM being used on a command line. I can get individual process RSS usage using ps -o rss= -p #{pid} How do I get all the memory usage for the entire system on the ...
2
votes
1answer
43 views

Equivalent of Ubuntu’s write-mime-multipart?

I would like to generate a multipart mime-encoded document for use as user data on EC2 instances. On Ubuntu, one is supposed to use write-mime-multipart to do this, as per these instructions. Does ...
2
votes
0answers
49 views

Does OS X support AnyIP?

I would like to assign a complete block to my mac as described in this question: Can I bind a (large) block of addresses to an interface? There it is explained that AnyIP is supported for IPv6 by the ...
2
votes
2answers
31 views

softlink to Network Location

does anyone know a trick how to generate a Softlink to a Network folder (smb or nfs) the idea is that there are some network folders i use regulary, but they usally not mounted .. the soflink i made ...
2
votes
0answers
51 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 ( ...
2
votes
0answers
55 views

How can I revoke an applications access to keychain passwords from the command-line?

Applications can be granted permanent unprompted access to passwords. You can add and revoke these privileges using the Keychain Access utility. (See this answer) I'd like to be able to revoke from ...
2
votes
1answer
85 views

How can I wipe an encrypted volume when the password is forgotten?

I have encrypted disk volume that is in the way and the passphrase is gone. How can I erase the contents and reuse the disk space?
2
votes
1answer
225 views

How can I run a command that requires user input through oh-my-zsh alias?

I'm trying to add Reminder.app items through the command line by invoking an alias. I use the Automator workflow solution from this question: How can I add reminders via the command line?, which ...
2
votes
0answers
310 views

How to execute a Parallels Windows application with command line parameters from Mac?

I am trying to call Beyond Compare Windows app to perform a file compre directly from Mac but I am block with command line argument passing. You can call Windows applications from the OS X command ...
2
votes
0answers
97 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 ...
2
votes
0answers
4k 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 ...
1
vote
2answers
344 views

Force simple UNIX path names for optimal us of command line apps?

I want to force myself to use folder/file names without spaces etc. so I'm 100% certain I can open and run them from the command line. Some terminal apps which I use frequently hava a hard time ...
1
vote
1answer
220 views

-d option for split is illegal on OS X 10.9

I have bash script that works on Ubuntu but for OS X 10.9 i get the error for split command: split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ...
1
vote
3answers
1k views

Find/Unrar/Delete Script

I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more. My need: I need to be able to scan a folder, find any .rar files, extract the ...
1
vote
2answers
107 views

How can I do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion?

I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else. I am presently filtering ...
1
vote
3answers
63 views

Open command doesn't like non escaped characters even between quotes?

Is it me or the open command does only accept escaped characters in parameters ? It tried open "~/Library/Messages/Attachments/87/07/079C263B-0586-48C6-B721-3C6AABAC76DF/Messages ...
1
vote
2answers
73 views

Why do I have to install CLT when Xcode is installed?

On a fresh Mavericks, I installed Xcode via the App store (accepted license agreement and enabled developer mode). After that, Command Line Tools (CLT) are found (checked via xcode-select -p). ...
1
vote
2answers
360 views

Terminal in full screen mode: how do I recover from “cat /dev/random”

What are the ways I can regain control over my computer when I have terminal in full screen mode and type: cat /dev/random