« シンプルなデータは良いデータ | トップページ | [Sequences]表紙を残して、表紙以外のページを全て削除する »

osxutils

osxutils


「osxutils1.7.pkg.zip」をダウンロード


内包されるコマンドは以下
/usr/local/bin

インストールされる
cpath
getfcomment
geticon
google
hfsdata
lsmac
mkalias
osxutils
rcmac
setfcomment
setfctypes
setfflags
seticon
setlabel
setsuffix
setvolume
trash
wiki
wsupdate

cpath(1) BSD General Commands Manual cpath(1)

NAME
cpath -- Copies current working directory path to the MacOS clipboard

SYNOPSIS
cpath [-vh]

DESCRIPTION
cpath will copy the path returned by the getcwd() function into the MacOS clipboard.
It is more convenient than:

# pwd | pbcopy

because it doesn't copy any newline character, which means you can paste the copied
path into a terminal application without trying to execute it.

-v Prints version and author.

-h Prints help/usage.

FILES
/usr/local/bin/cpath

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------


getfcomment(1) BSD General Commands Manual getfcomment(1)

NAME
getfcomment -- Print Mac OS comment for file

SYNOPSIS
getfcomment [-vhpc] file ...

DESCRIPTION
getfcomment is a command line program which prints out the Mac OS comment on a file
passed as an argument.

getfcomment supports the following flags:

-p Name of file will be printed before each comment

-c Output Mac OS Classic Desktop Database comment instead of Mac OS X Finder
comment

-v Print version and exit

-h Print help and exit

FILES
/usr/local/bin/getfcomment

SEE ALSO
geticon(1), fileinfo(1), hfsdata(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

geticon(1) BSD General Commands Manual geticon(1)

NAME
geticon -- Get the icon of a Mac OS X file.

SYNOPSIS
geticon [-vh] [-t type] [-o outputfile] file

DESCRIPTION
geticon is a command line utility for extracting the icon from a Mac OS X file or
folder. The default behaviour is to extract the icon to the current working direc-
tory in .icns format. This can be overridden using the -t and -o options described
below.

A list of flags and their descriptions:

-o Allows you to designate a path where the icon file will be created

-t Allows you to specify what format you want to extract the icon to. Valid
values are icns, png, gif, tiff and jpeg.

-v Prints version and author

-h Prints short help/usage string

FILES
/usr/local/bin/geticon

SEE ALSO
seticon(1), GetFileInfo(1), lsmac(1), fileinfo(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

NAME
google -- start Google search from the command line in MacOS X.

SYNOPSIS
google [-i] searchword ...

DESCRIPTION
google is a very small and simple program that enables you to open a browser window
with a google query from the command line. You can pass the search words as multi-
ple arguments or as a single argument within brackets.

An example of typical usage would be:

# google The Stuff That I need to look up

or, alternatively

# google 'The Stuff That I need to look up'

google supports the following options:

-i Search for images

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/google

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

hfsdata(1) BSD General Commands Manual hfsdata(1)

NAME
hfsdata -- retrieve Mac meta-data for a file or folder

SYNOPSIS
hfsdata [-vhxAcmatrRsSdDTCklLoOe] file

DESCRIPTION
hfsdata is a command line tool to get all sorts of miscellaneous HFS or Mac OS-spe-
cific meta-data for a given file. You can specify the exact meta-data you want to
be printed as output by using one of these flags:

-e Prints the path of the file pointed to by a given alias

-x Prints whether file's suffix is hidden by the Finder or not

-A Prints the name of the file's preferred application for opening

-c Prints date created in standard format

-m Prints date modified in standard format

-a Prints date accessed in standard format

-t Prints date attribute was modified in standard format

-r Prints logical resource fork size in bytes

-R Prints physical resource fork size in bytes

-s Prints total logical size of all forks in bytes

-S Prints total physical size of all forks in bytes

-d Prints logical data fork size in bytes

-D Prints physical data fork size in bytes

-T Prints the file's 4-character type code

-C Prints the file's 4-character creator code

-k Prints the file's 'Kind', as it appears in the Finder

-l Prints the file's label as a number (i.e. 0-8)

-L Prints the file's label as a name (e.g. Green)

-o Prints the file's Mac OS X Finder comment

-O Prints the file's Mac OS 9 Desktop Database comment

-v Prints hfsdata program version and exits

-h Prints help

FILES
/usr/local/bin/hfsdata

SEE ALSO
geticon(1), fileinfo(1), getfcomment(1), lsmac(1), setfflags(1), setfctypes(1),
GetFileInfo(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
lsmac(1) BSD General Commands Manual lsmac(1)

NAME
lsmac -- list files in directory and associated Mac meta-data

SYNOPSIS
lsmac [-vhsboapl] directory

DESCRIPTION
lsmac is an ls-like utility for listing the files contained in a given directory on
a HFS or HFS+ volume and the MacOS meta-data associated with them. The output is
akin to that of the ls long view. Each line follows the format below:

[Finder flags] [file type] [creator type] [size] [name or path]

The Finder flags of each file are displayed as a sequence of six characters. Each
character indicates whether one of the following flags are set:

I File has the Invisible flag set

C File has the Custom Icon flag set

L File is Name Locked (i.e. it is a system file)

B File has the Bundle bit flag set

A File has the Alias flag set

S File has the Stationery flag set

An '-' indicates that a flag is not set. For example, a file with none of the
Finder flags set would be listed as '------' while a file with all the flags set
would be listed as 'ICLBAS'.

lsmac accepts the following options:

-v Prints version and author and then exits

-h Prints help

-L Prepends the MacOS Label name of the file in question to each output line

-f[fork]
Specify which forks to count when calculating file size. You can specify
fork as 'rsrc', 'data' or 'both' (minus quote marks).

-b Display file size in bytes (i.e. 12977128 bytes)

-o Omit folders when listing directory contents

-F Only list folders when listing directory contents

-a Display all files, including files with the . prefix.

-p Display full file paths instead of file names

-Q Display file name or path within quotation marks (").

-l When listing file size, use physical size instead of logical size.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/lsmac

SEE ALSO
ls(1), setfctypes(1) GetFileInfo(1) setsuffix(1), mkalias(1) cpath(1), SetFile(1),
setfflags(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------


mkalias(1) BSD General Commands Manual mkalias(1)

NAME
mkalias -- Create MacOS Finder aliases

SYNOPSIS
mkalias [-vhctr] [source-file] [target-alias]

DESCRIPTION
mkalias is similar to ln but creates MacOS Finder aliases instead of UNIX file sys-
tem links. The alias created is identical to aliases created manually using the
Finder. The alias gets the source file's custom icon and File and Creator type, and
has the kIsAlias and kHasCustomIcon Finder flags set.

The following options are accepted:

-r Make the alias relative instead of absolute. See http://devel-
oper.apple.com/technotes/tn/tn1188.html for why this is useful

-c Omit copying source file's icon to target alias

-t Source file's type and creator are not applied to the alias

-v Print version and author

-h Print help

FILES
/usr/local/bin/mkalias

SEE ALSO
ln(1), lsmac(1), setfctypes(1), setfflags(1), cpath(1), setsuffix(1),
setfcomment(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

rcmac(1) BSD General Commands Manual rcmac(1)

NAME
rcmac -- recursively lists all files in a hierarchy in the style of lsmac

SYNOPSIS
rcmac [directory]

DESCRIPTION
rcmac descends into directory structures and lists every single non-directory file
within the structure in the style of 'lsmac'. See the lsmac(1) man page for
details. The program accepts only one argument, which must be the path of a direc-
tory to descend into.

FILES
/usr/local/bin/rcmac

SEE ALSO
lsmac(1), fileinfo(1), GetFileInfo(1),

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
setfcomment(1) BSD General Commands Manual setfcomment(1)

NAME
setfcomment -- set MacOS Finder comments of files and folders.

SYNOPSIS
setfcomment [-vhns] [-c -comment] file ...

DESCRIPTION
setfcomment is a utility for setting MacOS Finder comments of files and folders.
This is done by sending the MacOS X Finder the appropriate type of Apple Event, or
if MacOS 9 Finder comment setting is enabled, by modifying the Desktop Database file
using File Manager APIs. Typical would usage would be:

setfcomment -c 'This is my comment' myfile.txt

The following options are supported:

-c -[comment]
Specifies the string you wish to set as Finder comment. This parameter is
required.

-n Omit setting MacOS 9 Finder comment. If this flag is set, the comments set
with setfcomment will not be visible in the MacOS 9 Finder.

-s Silent mode. setfcomment sends no output to STDOUT confirming that the com-
ment for each input file has been successfully set.

-v Prints version and author and then exits

-h Prints help

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setfcomment

SEE ALSO
SetFile(1), GetFileInfo(1), setlabel(1), seticon(1), setfflags(1), setsuffix(1)
lsmac(1),

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

setfctypes(1) BSD General Commands Manual setfctypes(1)

NAME
setfctypes -- set heritage MacOS File and Creator types.

SYNOPSIS
setfctypes [-vhs] [-f -filetype] [-c -creator] file ...

DESCRIPTION
setfctypes is a utility for setting the heritage MacOS File Type and Creator Type of
files. It's very simple to use and is about twice as fast as Apple's SetFile(1)
command. An example of typical usage would be:

setfctypes -f TEXT -c ttxt myfile.txt

It is not neccesary to specify both the -f and -c options.

setfctypes accepts the following options:

-v Prints version and author and then exits

-h Prints help

-s Silent mode. No errors or problems are reported.

-c Followed by a four character string specifying Creator type.

-f Followed by a four character string specifying File type.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setfctypes

SEE ALSO
lsmac(1), SetFile(1), GetFileInfo(1), setlabel(1), seticon(1), setfcomment(1),
setfflags(1), setsuffix(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
setfflags(1) BSD General Commands Manual setfflags(1)

NAME
setfflags -- Set the MacOS Finder flags of files

SYNOPSIS
setfflags [-vhmp] [-c bool] [-s bool] [-l bool] [-b bool] [-i bool] [-a bool] file
...

DESCRIPTION
setfflags is a command line program for altering the MacOS Finder flags of files
and/or folders. You must specify at least one flag to be set or unset using the
following options:

-c Has Custom Icon

-s Is Stationery

-l Is Name Locked

-b Has Bundle Bit

-i Is Invisible

-a Is Alias

The specification of each of the above must be followed by a boolean value, i.e.
"true"/"false" or 1/0. Here's an example of typical usage. Let's say we want to
set a file's Invisibility flag:

# setfflags -i true /path/to/file

Using numbers instead of string to specify the boolean value is also permitted.
Here we set the invisibility flag and unset the custom icon flag.

# setfflags -i 1 -c 0 /path/to/file

If you have any questions, please direct them to Sveinbjorn Thordarson
.

FILES
/usr/local/bin/setfflags

SEE ALSO
SetFile(1), GetFileInfo(1), setfcomment(1), setsuffix(1), setlabel(1), seticon(1),
lsmac(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
seticon(1) BSD General Commands Manual seticon(1)

NAME
seticon -- Set icon of Mac OS X files.

SYNOPSIS
seticon [-vhd] [source] [file ...]

DESCRIPTION
seticon is a utility for setting a custom icon on Mac OS X files and folders via the
command line. The first argument to seticon is the source file, i.e. the file with
the icon you wish to apply to other file(s). Any arguments after the first should
be files which you wish to give the custom icon to.

Please note that this need not be an .icns file -- see the -d option for using an
.icns file as a source. seticon defaults to retrieving the actual icon of the file
in question.

Typical usage would look like this:

seticon sourcefile file1 file2

The example above would result in the icon of sourcefile being applied to the files
file1 and file2 as custom icons.

seticon supports the following options:

-d Use the data of the source file as icon instead of the source file's actual
icon.

-v Print version and author

-h Print a short help text on program usage

FILES
/usr/local/bin/seticon

SEE ALSO
geticon(1), lsmac(1), fileinfo(1), setfflags(1), setlabel(1), SetFile(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setlabel(1) BSD General Commands Manual setlabel(1)

NAME
setlabel -- set MacOS Finder label of files and folders.

SYNOPSIS
setlabel [-vhs] Label file ...

DESCRIPTION
setlabel is a utility for setting the MacOS Finder label of files and folders. This
is done by modifying the meta-data flag fields in the HFS file record. The avail-
able labels (case sensitive) are:

None Red Orange Yellow Green Blue Purple Gray

An example of typical usage would be:

setlabel Gray myfile.txt

The following options are supported:

-v Prints version and author and then exits

-h Prints help

-s Silent mode. No output list or error reports are printed.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setlabel

SEE ALSO
SetFile(1), GetFileInfo(1), setfflags(1), setsuffix(1) lsmac(1), setfcomment(1),
setfctypes(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setsuffix(1) BSD General Commands Manual setsuffix(1)

NAME
setsuffix -- Program to set, remove and replace filename suffices.

SYNOPSIS
setsuffix [-vhsefar] [-l length] [-x suffix] [file ...]

DESCRIPTION
setsuffix can be used to set, change and remove filename suffices. Suffices are
used by MacOS X to identify files and determined what application to employ when
opening them.

setsuffix accepts the following options:

-x -[suffix]
Use the -x option to specify the suffix you want added, without the leading
dot (".")

-l -[length]
Sets the max number of characters that can constitute a valid suffix.
setsuffix defaults to 4, so without this specification it will ignore all
suffices longer than 4 characters.

-s Silent mode. Only critical errors or invalid usage errors are printed to
stdout.

-e Ignore files that already have a suffix.

-f Ignore folders.

-a Instead of replacing previous file suffix, add it.

-r Remove file suffix. If this option is specified, all other options apart
from -l are ignored.

FILES
/usr/local/bin/setsuffix

SEE ALSO
lsmac(1), setfctypes(1), mkalias(1), cpath(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setvolume(1) BSD General Commands Manual setvolume(1)

NAME
setvolume -- Sets global Mac OS X sound output volume

SYNOPSIS
setvolume [0-100]

DESCRIPTION
setvolume is a command line tool for controlling the global Mac OS X sound output
voluem. It accepts a single number, from 0 (silent) to 100 (maximum volume).

FILES
/usr/local/bin/setvolume

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1), wsupdate(1,) seticon(1,) geticon(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
trash(1) BSD General Commands Manual trash(1)

NAME
trash -- Moves files to the Trash

SYNOPSIS
trash [file] ...

DESCRIPTION
trash is akin to the 'rm' command but instead of unlinking files it moves them into
the MacOS Trash in the user's home directory. It behaves in a similar way to the
Finder in this respect, since files are renamed to 'File copy 1' and so forth if
they already exist in the Trash.

FILES
/usr/local/bin/trash

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1), wsupdate(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

wiki(1) BSD General Commands Manual wiki(1)

NAME
wiki -- search Wikipedia from the command line

SYNOPSIS
wiki [search words] [...]

DESCRIPTION
wiki is a command line program to search the Wikipedia. All arguments following the
command will be counted as search terms. A browser window will open with the rele-
vant Wikipedia results.

FILES
/usr/local/bin/wiki

SEE ALSO
google(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
wsupdate(1) BSD General Commands Manual wsupdate(1)

NAME
wsupdate -- report file system change to Mac OS X

SYNOPSIS
wsupdate [-vh] file ...

DESCRIPTION
wsupdate is a simple command line tool to execute the NSWorkspace method 'note-
FileSystemChanged'. This will make the Finder update its open windows. If no argu-
ments are given, the system will receive a general notification. If files are spec-
ified, these particular locations will be updated.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/wsupdate

Darwin May 5, 2014 Darwin

|

« シンプルなデータは良いデータ | トップページ | [Sequences]表紙を残して、表紙以外のページを全て削除する »

OSX」カテゴリの記事