View Full Version : get info on a folder/app/etc.
03-12-2003, 11:40 AM
how do i do it? like when i right-click on an icon and select Get Info. just wondering how to do with terminal.
03-12-2003, 11:47 AM
I'm not sure what you are wanting to do. Are you asking how you can use a command in Terminal to bring up the GetInfo box on some file? Or are you asking what command to use in Terminal to get textual info (inside Terminal) on a file or folder?
If the latter, you need to look at the command 'ls'. For example:
ls -l myfile
03-12-2003, 12:05 PM
simply open the GetInfo box. sorry that wasnt clear.
03-12-2003, 12:15 PM
I don't know how to bring up the GetInfo window using a command in Terminal. This is a capability of Finder. But maybe there is a way to use AppleScript to ask Finder to do it. You can run AppleScripts from Terminal via the use of /usr/bin/osascript
03-12-2003, 07:58 PM
osascript -e 'tell application "Finder" to open information window of folder "Documents" of folder "yourUsername" of folder "Users" of startup disk'
sorry about the awful syntax, never understood path handling in AppleScript. still might be a starting point
03-12-2003, 11:09 PM
Here's a Bourne shell script that seems to work.
Copy and paste it into a new file and make it executable with 'chmod'
# This script opens the Finder's "Get Info" window
# for the file or folder specified as a command-line argument.
if [ $# -lt 1 ]; then
echo "Usage: $scriptname file_or_folder"
if [ ! -e $path ]; then
echo "$scriptname: $path: No such file or directory"
case $path in
/*) fullpath=$path ;;
~*) fullpath=$path ;;
*) fullpath=`pwd`/$path ;;
if [ -d $fullpath ]; then
/usr/bin/osascript > /dev/null <<EOT
tell application "Finder"
set macpath to POSIX file "$fullpath" as text
open information window of $file_or_folder macpath
03-13-2003, 02:02 AM
Nice script! There's a funky little companion script to this one at
Just allows you to set comments from the command line, but the implementation might be worth a gander if anyone's interested in this sort of thing. At this rate we'll have all Finder possibilities replaced by CLI equivalents by, say, 2038.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.