Posts Tagged “commandline”

If you are a Terminal lover you might try mounting .dmg files from commandline.

Basicly thats pretty easy, so just continue reading

Read the rest of this entry »

Tags: , , , , , , , , ,

Comments No Comments »

The next stumble: Secrets

The project is hosted at Google Code

Secrets lets you customize many Mac OS settings that are hidden or incomplete.

Many of these values can harm your system if used improperly. Use it at your own risk.

Its a prefPane which allows access to many (hidden) system- and application settings. Usualy those settings can be accessed via command-line (defaults) but aren’t we mac-users ? aren’t we always looking for a gui-based solution ? for sure we are….so get it. The application is developed by the Quicksilver team and currently in beta-status.

Found that application via daringfireball.net

Tags: , , , , , , ,

Comments No Comments »

I must admit, i really like the locate command.

Unfortunally the database is usually out of date if you need it…so here the easy way how to update it

  • Open Terminal.app
  • Enter: sudo /usr/libexec/locate.updatedb

Guess it would make sense to create a cron-job or similar for this update-procedure

Haven’t tested this on 10.4 but i bet its the same commands. Otherwise should the man-page in 10.4 solve this question (man locate)

About locate itself:

locate = find data files, programs, directories, & objects matching your search.

For example, let’s say I’m searching for a file with the word “license” in the filename:

locate license

Since you usually receive quite a long list when running locate, you’ll probably want to do this:

locate license | more

-or-

locate license | less

Note that locate searches by name only. To search by any other attribute, use find. To search only for commands, use whereis.

Tags: , , , , , , , , , ,

Comments No Comments »

If you want to manage Apple’s Quick Look in 10.5 the following MAN-Page could be interesting.

Related 3rd party links:

Tags: , , , , , , , ,

Comments No Comments »

Just found the project Sleepwatcher

Quote from the project page:

SleepWatcher 2.0.5 (now compatible with Mac OS X 10.5 “Leopard”) is a command line tool (daemon) for Mac OS X that monitors sleep, wakeup and idleness of a Mac. It can be used to execute a Unix command when the Mac or the display of the Mac goes to sleep mode or wakes up or after a given time without user interaction. It also can send the Mac to sleep mode or retrieve the time since last user activity. A StartupItem, sample start and sleep scripts and the source code for sleepwatcher are included in the download. A little bit knowledge of the Unix command line is required to benefit from this software. You can also download a standalone source code archive for SleepWatcher 2.0.5. SleepWatcher 2.0.5 runs with Mac OS X 10.3 to 10.5. For Mac OS X 10.1 to 10.3, there is still SleepWatcher 1.0.1 available. SleepWatcher is published under the GNU General Public License. Awhile ago, it was a Pick of the Week at Mac OS X Hints.

Tags: , , , , , , , , , , , , ,

Comments No Comments »

Based on a post on macosxhints.com

While lookupd was existing & working in 10.4 to clear DNS Cache the command was replaced in 10.5 with:

dscacheutil

So now you can flush your DNS cache with

dscacheutil -flushcache

Here the link to the matching post for Tiger / 10.4

Tags: , , , , , , ,

Comments No Comments »

Found a nice hint for all cli-lovers on OSXDaily.com

Quote from the article:

Quick Look is a nice feature added in 10.5, I use it often for glancing at the content of various documents and it certainly beats launching an application. If you’re an avid command line user though, you may be browsing through a directories contents and wondering just what is that JPG or DOC file. Wonder no more, because you can easily use Quick Look from the command line:

From the command line, use the following syntax:

qlmanage -p filename.jpg

This will launch a Quick Look window with whatever file is specified as ‘filename.jpg’, the file type can be anything that Quick Look is compatible with (which seems to be just about everything).

Tags: , , , , , ,

Comments No Comments »

OSXDaily posted something interesting here

The geekier amongst us and those familiar with Unix should really like this trick. You can have Mac OS X 10.5 display the full directory path in the Finder window title bar by issuing a simple command from the Terminal.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Then you’ll want to kill the Finder for changes to take effect:

killall Finder

and the result looks like this:

To disable the full path title bars and revert back to the default, simply repeat the command with NO instead of YES as the operator:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO

killall Finder

Tags: , , , , , , ,

Comments No Comments »

Stupid idea….but ok lets explain it anyways.

Today we want to control our mac disc-drive over command-line using the “drutil” command.

Basicly its just open & close the drive, but you can check the commands-man-page for more details and functions, or check Apple’s online-documentation

  • Open Terminal.app
  • Enter:
    • drutil tray open -> to open the disc-drive tray
    • drutil tray close -> to close the disc-drive tray

Thats it. Some more options for drutil:

Usage: drutil -drive [drive-arguments] command [command-options-and-arguments]
drutil commands are:
atip - Displays ATIP information about inserted CD-R/RW media.
bulkerase - Bulk erases -RW media in either quick or full mode. drutil bulkerase (quick | full)
burn - Burns a given file or directory to disc. drutil burn (burn-options) <path>
cdtext - Displays CD-Text present on an audio CD.
discinfo - Displays disc related info when media is present.
dumpiso - Parses ISO-9660 directory structures. drutil dumpiso <devnode> <block> [format]
dumpudf - Parses UDF directory structures. drutil dumpudf <devnode> <block> [format]
eject - Ejects media from the drive (if any).
erase - Erases -RW media in either quick or full mode. drutil erase (quick | full)
filename - Translates filenames for different filesystems. drutil filename <name>
getconfig - Displays current and supported device features and profiles. drutil getconfig (current | supported)
info - Displays detailed information about connected drives.
list - Lists all connected burning devices.
poll - Constantly polls and displays device notifications.
status - Displays detailed information about inserted media.
subchannel - Displays subchannel (MCN, ISRC) info when CD media is present.
toc - Displays TOC information about inserted CD media.
trackinfo - Displays track related info when media is present.
tray - Opens and closes drive tray, and ejects media. drutil tray (open | close | eject)
version - Display the OS and DiscRecording version numbers.

Have fun with it.

Related links: | MacOSXHints |

Tags: , , , , ,

Comments No Comments »

I must admit, i am a terminal.app user.

Apple implemented some tricks for us, lets see

  1. Redo last command with an additional sudo in front of the command:
    1. Enter: “sudo !!”
  2. Return to the last folder
    1. Enter: “cd” insteed of “cd ..”

Well that was a quicky :P

Tags: , , ,

Comments No Comments »

12»