ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustomed to editing images one at a time with a graphical user interface (GUI) with such programs as Gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific operation at different times to the same or different image. For these types of operations, the command-line image processing utility is appropriate.
You should use a different editor that can have its binary run properly from the command line like SublimeText (sudo subl /path/to/file) or TextMate (sudo mate /path/to/file). Or just suck it up and use vi or nano:-) If you're going to be doing a lot of this type of thing TextEdit is probably the least desirable editor to use anyhow. However, the Terminal’s 'mdls' command line gives access to a complete collection of a file’s metadata. To use the Terminal’s 'mdls' command line to reveal a files metadata, run the Terminal, and then key in 'mdls' followed by a single space. Next, drag and drop the select file from Finder to the open Terminal window, and then hit 'Enter'. The question is asking for a command line editor. – psusi Sep 12 '13 at 13:39 1 @psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. To log into your Mac on another Mac, execute the command: ssh -l username remote-address. Replace username with the username you'd use to log into OS X and remote-address with the IP address given to you in the Sharing pane. You can now control your Mac and execute Terminal commands remotely, a real plus.
The ImageMagick command-line tools exit with a status of 0 if the command line arguments have a proper syntax and no problems are encountered. Expect a descriptive message and an exit status of 1 if any exception occurs such as improper syntax, a problem reading or writing an image, or any other problem that prevents the command from completing successfully.
Here is a short description for each command-line tool. Click on the program name to get details about the program usage and a list of command-line options that alters how the program behaves. If you are just getting acquainted with ImageMagick, start with the magick program. Be sure to peruse Anthony Thyssen's tutorial on how to use ImageMagick utilities to create, edit, compose, or convert images from the command-line.
- convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
- use this scripting language interpreter to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
We also support sub-commands for compatibility with ImageMagick version 6:
- magick animate
- animate an image sequence on any X server.
- mathematically and visually annotate the difference between an image and its reconstruction.
- overlap one image over another.
- interpret and execute scripts written in the Magick Scripting Language (MSL).
- convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
- display an image or image sequence on any X server.
- describe the format and characteristics of one or more image files.
- save any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
- resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, magick writes to a different image file.
- create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.
- a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making
stream
desirable when working with large images or when you require raw pixel components.
Your installation may have direct ImageMagick version 6 compatibility links. If so, you can access the tools directly by referring to them by name. For example,
Terminal User Guide
Use these shortcuts to save time when using Terminal.
Work with Terminal windows and tabs
Action | Shortcut |
---|---|
New window | Command-N |
New window with same command | Control-Command-N |
New tab | Command-T |
New tab with same command | Control-Command-T |
Show or hide tab bar | Shift-Command-T |
Show all tabs or exit tab overview | Shift-Command-Backslash () |
New command | Shift-Command-N |
New remote connection | Shift-Command-K |
Show or hide Inspector | Command-I |
Edit title | Shift-Command-I |
Edit background color | Option-Command-I |
Make fonts bigger | Command-Plus (+) |
Make fonts smaller | Command-Minus (–) |
Next window | Command-Grave Accent (`) |
Previous window | Command-Shift-Tilde (~) |
Next Tab | Control-Tab |
Previous Tab | Control-Shift-Tab |
Split window into two panes | Command-D |
Close split pane | Shift-Command-D |
Close tab | Command-W |
Close window | Shift-Command-W |
Close other tabs | Option-Command-W |
Close all | Option-Shift-Command-W |
Scroll to top | Command-Home |
Scroll to bottom | Command-End |
Page up | Command-Page Up |
Page down | Command-Page Down |
Line up | Option-Command-Page Up |
Line down | Option-Command-Page Down |
![Mac Mac](/uploads/1/1/8/9/118934772/868946170.png)
Edit a command line
Action | Shortcut |
---|---|
Reposition the insertion point | Press and hold the Option key while moving the pointer to a new insertion point. |
Move the insertion point to the beginning of the line | Control-A |
Move the insertion point to the end of the line | Control-E |
Move the insertion point forward one character | Right Arrow |
Move the insertion point backward one character | Left Arrow |
Move the insertion point forward one word | Option-Right Arrow |
Move the insertion point backward one word | Option-Left Arrow |
Delete to the beginning of the line | Control-U |
Delete to the end of the line | Control-K |
Delete forward to the end of the word | Option-D (available when Use Option as Meta key is selected) |
Delete backward to the beginning of the word | Control-W |
Delete one character | Delete |
Forward-delete one character | Forward Delete (or use Fn-Delete) |
Transpose two characters | Control-T |
Select and find text in a Terminal window
Action | Shortcut |
---|---|
Select a complete file path | Press and hold the Shift and Command keys and double-click the path |
Select a complete line of text | Triple-click the line |
Select a word | Double-click the word |
Select a URL | Press and hold the Shift and Command keys and double-click the URL |
Select a rectangular block | Press and hold the Option key and drag to select text |
Cut | Command-X |
Copy | Command-C |
Copy without background color | Control-Shift-Command-C |
Copy plain text | Option-Shift-Command-C |
Paste | Command-V |
Paste the selection | Shift-Command-V |
Paste escaped text | Control-Command-V |
Paste escaped selection | Control-Shift-Command-V |
Find | Command-F |
Find next | Command-G |
Find previous | Command-Shift-G |
Find using the selected text | Command-E |
Jump to the selected text | Command-J |
Select all | Command-A |
Open the character viewer | Control-Command-Space |
Work with marks and bookmarks
Action | Shortcut |
---|---|
Mark | Command-U |
Mark as bookmark | Option-Command-U |
Unmark | Shift-Command-U |
Mark line and send return | Command-Return |
Send return without marking | Shift-Command-Return |
Insert bookmark | Shift-Command-M |
Insert bookmark with name | Option-Shift-Command-M |
Jump to previous mark | Command-Up Arrow |
Jump to next mark | Command-Down Arrow |
Jump to previous bookmark | Option-Command-Up Arrow |
Jump to next bookmark | Option-Command-Down Arrow |
Clear to previous mark | Command-L |
Clear to previous bookmark | Option-Command-L |
Clear to start | Command-K |
Select between marks | Shift-Command-A |
Other shortcuts
![Mac Mac](/uploads/1/1/8/9/118934772/752140947.png)
Action | Shortcut |
---|---|
Enter or exit full screen | Control-Command-F |
Show or hide colors | Shift-Command-C |
Open Terminal preferences | Command-Comma (,) |
Break | Typing Command-Period (.) is equivalent to entering Control-C on the command line |
Print | Command-P |
Soft reset terminal emulator state | Option-Command-R |
Hard reset terminal emulator state | Control-Option-Command-R |
Open a URL | Hold down the Command key and double-click the URL |
Add the complete path to a file | Drag the file from the Finder into the Terminal window |
Export text as | Command-S |
Export selected text as | Shift-Command-S |
Reverse search command history | Control-R |
Toggle “Allow Mouse Reporting” option | Command-R |
Toggle “Use Option as Meta Key” option | Command-Option-O |
Show alternate screen | Option-Command-Page Down |
Hide alternate screen | Option-Command-Page Up |
Open man page for selection | Control-Shift-Command-Question Mark (?) |
Search man page index for selection | Control-Option-Command-Slash (/) |
Complete directory or file name | On a command line, type one or more characters, then press Tab |
Display a list of possible directory or file name completions | On a command line, type one or more characters, then press Tab twice |
Mac Os Command Line
See alsoCreate custom function keys in Terminal on MacChange Profiles Keyboard preferences in Terminal on MacApple Support article: Mac keyboard shortcuts