UNIX command to run remotely?

Does anyone know the UNIX command to generate a list of installed applications in the Applications folder AND their version numbers?

Hi
Using ls /Applications is OK up to a point. I think using system_profiler might be better? Something like:
system_profiler SPApplicationsDataType
Should give you what you want? Be prepared to be patient as it will list every application/utility and could take some time. On 10.6 you may see the first few entries referring to "System Flippers etc" You can safely ignore these
On a side note I've never had a problem with ARD (going back years) gathering reports. I would try and fix that problem when you get the chance.
Tony

Similar Messages

  • Unix Command to change remote screen resolution

    greetings,
    well the topic pretty much says it all :
    I'm running ARD 2,2 on a 10.2.8 Server , from my remote admin box I get a recurring "attempt to reconnect" to the machine when controlling or observing the screen.
    I ran a report which list the servers screen resolution as 1600x1200 (holy smokes bullwinkle). This setting is not correct. I can fully interact with the server (thru the menus of ARD) and all services are running. The server is at the login screen ( as per ARD "current app").
    thank you

    First, you need to install a utility called cscreen (freeware) on the server (or any other workstation you want to control).
    Once you have that installed, here is the syntax for the Send Unix Command:
    Usage: cscreen [-d <depth>] [-x <width>] [-y <height>] [-r <refresh>] [-s <display>] [-v] [-m] [-f] [-l] [-h]
    [-d <depth>] : specifies the bit depth (bits per pixel)
    [-x <width>] : specifies the width in pixels
    [-y <height>] : specifies the height in pixels
    [-r <refresh>] : specifies the refresh rate in Hz
    [-s <display>] : specifies which display to use (defaults to main display)
    use a as the option to -s to specify the action on all displays
    [-v] : display valid modes (use -s to specify display or nothing for the default)
    [-m] : require an exact match
    [-f] : forces settings (ignores safety mechanisms; USE AT YOUR OWN RISK)
    [-l] : lists the current displays and modes
    [-p] : sets the requested display to have the menu bar
    [-h] : displays the usage
    Note: Using -p will change the display index so you will likely want to use -l again to show the current displays if you wish to use -p a second time.
    For example, to set to 1024x768:
    /pathtoutility/cscreen -x 1024 -y 768

  • Unix security and privacy setting unix command via apple remote desktop

    Could someone guide me on the unix command to set System Preferemces Security & Privacy to xx minutes [see screenshot please] via Apple Remote Desktop.
    https://dl.dropbox.com/u/5485939/osx_screenshots/sys%20pref%20security%20privacy .png
    Thank you,

    Pereference tend to be stored for the computer as a whole
    /Library/Preferences/
    or specifcally for the user
    /Users/USERNAME/Library/Preferences/
    well when I set required password for XX minutes... I see that
    /Users/USERNAME/Library/Preferences/com.apple.screensaver.plist modfication date & time changes to the current time & date... hMMM maybe the setting we want is stored here? Can we test this?
    If I check require password and then do the terminal command:
    defaults read ~/Library/Preferences/com.apple.screensaver
    I see
        askForPassword = 1;
        askForPasswordDelay = 0;
        tokenRemovalAction = 0;
    turn it off
    run the terminal command;
    defaults read ~/Library/Preferences/com.apple.screensaver
    I see:
        askForPassword = 0;
        askForPasswordDelay = 0;
        tokenRemovalAction = 0;
    so I can turn it on with
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    and I can turn it off with
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool FALSE
    So if a user is logged into a computer. I could send unix command as current console user.
    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    BUT what if the user is logged out? or there are more then one user on the computer?
    then I could run unix command as user root and send
    defaults write /Users/USERNAME/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    (replace USERNAME with the user's short name.)
    but what if I don't know the user name? or names
    send unix command as root
    ls -al /Users/
    get back a list of folders
    bob
    surely
    shares
    and then do
    send unix command as root
    defaults write /Users/bob/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    defaults write /Users/surely/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE
    you could also do some thing like
    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 5
    if you want to change the period of time to lock to 5 seconds
    or
    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 900
    (900 seconds  / 60 seconds = 15 minutes)

  • UNIX Command to run cron jobs

    Is there a UNIX command I can send to the target machines to force them to run the 'Daily, Weekly, & Monthly' cron jobs?
    Do you guys know of a place that I can find useful commands to send to the machines?

    Send:
    periodic weekly
    This command will run, right now, all the system maintenance commands which normally run via cron only at 4:30 on Saturday morning. To see the actual maintenance commands that are going to be executed, look in /etc/periodic/weekly. You can also do "periodic daily" or "periodic monthly".

  • How to change order of network ports - unix command in Apple Remote Desktop

    I am trying to do a report of 130 machines and I want the IP addresses included in the report. When I do the report a bunch of them are missing because the only selection is "Primary Network IP" but on many of the machines the order of the network connections is such that PPP is the top and therefor primary connection
    Do you know of a unix command I can send to change the network order so that en0 is primary on all machines?

    Hi Brian
    Issue this command:
    sudo networksetup -listnetworkserviceorder
    This will list the current service order as well as giving you an idea of what name to use for each Service. For example en0 will be Ethernet; en1 will be Airport; fw0 will be Firewire and Bluetooth will be Bluetooth DUN.
    To change the order so as Ethernet will be first rather than Bluetooth for example, followed by Airport, Firewire and Bluetooth issue this command:
    sudo networksetup -ordernetworservices Ethernet Airport Firewire "Bluetooth DUN"
    That should be it. Any Service that has a space within the name has to be escaped hence the double quotes. If you want to change the order to something else then alter the Service order to suit. To see a full list of available commands issue:
    networksetup -help
    Tony

  • How to run UNIX command to a remote SUN machine through Java from Windows

    Dear All:
    I want to write one Java program which will be run on my Windows Machine.
    My Java program will will login in a SUN machine remotely say telnet and run some command.
    I want all those command output in my client windows PC for futher processing.
    Can anyone help me doing this?
    BR,
    P. Gupta

    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class TelnetSocketDemo {
    static String list="";
    static String listArr[], hostArr[];
    static String host="", lhost="";
    public static void main(String[] args)throws IOException
    ExecuteUnixCmd obj=new ExecuteUnixCmd();
    // InetAddress localMachine = InetAddress.getLocalHost();
    // host=localMachine.getHostName();
    list=obj.ExecuteUnixCmdMain();
    int port=getPort(list,"Live");
    System.out.println(port);
    Socket sock = null;
    String prompt=">";
    String output = null;
    try
    // Connect to the PoleStar process.
    sock = new Socket("localhost",port);
    sock.setSoTimeout(60000);
    // Get the I/O streams for the socket.
    PrintWriter out = new PrintWriter(sock.getOutputStream(), true);
    InputStream in = sock.getInputStream();
    // Get to the silent console port.
    // out.println("S");
    // readToPrompt(in,area);
    // Fetch the response to the command.
    out.println("list all");
    output = readToPrompt(in,prompt);
    //System.out.println(output);
    //out.println("quit");
    //output=readToPrompt(in);
    catch (Exception ex)
    String msg = "unable to get Connection for PoleStar";
    finally
    try
    // close socket
    sock.close();
    catch (Exception ex)
    System.out.println(output);
    private static String readToPrompt(InputStream in,String prompt)throws IOExcepti
    on
    byte[] mByte = null;
    int iStrt = 0, iLen = 2000, nBytes = 0;
    StringBuffer buf = new StringBuffer();
    String s = null;
    boolean bNotFinished = true;
    do
    mByte = new byte[2000];
    nBytes = in.read(mByte, iStrt, iLen);
    if (nBytes == -1)
    break;
    // lost our TCP/IP connection
    // bNotFinished = false;
    // Convert byte stream to a string
    s = new String(mByte, 0, iStrt + nBytes);
    if (prompt.equals("") == false)
    if (prompt.equals(">"))
    if (s.indexOf(0x04) != -1)
    bNotFinished = false;
    // the hub sends the prompt at the beginning and the end
    else if (s.indexOf(prompt) != -1)
    bNotFinished = false;
    buf.append(s);
    } while (bNotFinished);
    return buf.toString();
    public static int getPort(String list, String area)
    int port;
    String listArr[],hostArr[];
    String lhost="";
    listArr=list.split(",");
    for(int i =0; i < listArr.length ; i++)
    lhost=listArr;
    hostArr=lhost.split("#");
    if((hostArr[1].equalsIgnoreCase("connectDev20"))&&(hostArr[0].indexOf(area)!=-
    1))
    port=Integer.parseInt(hostArr[2]);
    return port;
    else
    continue ;
    return 0;

  • Unix command from pl/sql

    How can I call a unix command or run a c program
    from a stored procedure in oracle 9i.

    Or if you want to do a host call then implement the following class as a Java stored procedure.
    import oracle.jdbc.*;
    public class util
    // Executes an operating system command. The command shall be fully qualified.
    // The Java connects with silent login. No environment set-up files are run
    // and no path is set. The mode can be "sync" or "async" for respectively
    // synchronous and asynchronous execution
    static public int OSCmd(String cmd, String mode, String[] output)
    throws IOException, InterruptedException
    System.out.println("OSCmd "+cmd+" ("+mode+")");
    output[0]="";
    // start command
    Process proc = Runtime.getRuntime().exec(cmd);
    if (mode.equals("sync"))
    // get command's stdout and stderr
    InputStream stdout = proc.getInputStream();
    InputStream stderr = proc.getErrorStream();
    String str;
    // Stdout
    BufferedReader br = new BufferedReader(new InputStreamReader(stdout));
    while ((str = br.readLine()) != null)
    output[0]+=str+"\n";
    br.close();
    // Stderr
    br = new BufferedReader(new InputStreamReader(stderr));
    while ((str = br.readLine()) != null)
    output[0]+=str+Long postings are being truncated to ~1 kB at this time.

  • Terminal/Unix Command to Mount External USB Drive?

    I am having a probelm with the directory on an external HDD. The "device" is showing up in the utility software (DRIVE GENIUS/DISK UTILITY) but not the "volume," so it can't affect any repairs except INTIALIZE. So, I'm presuming the drive is physically okay - just the directory is fouled up. Is there some unix command to run that will repair the directory in some manner? Thanks!

    Hi Metroxing,
       What you presume is not a given but yes, the existence of the device file greatly decreases the relative probability of your having a hardware problem. However, I have a question. I'm not sure of what you mean by the term "directory".
       In "UNIX" jargon a directory is that which in "Mac" jargon would be a filesystem "folder". However, there is another data structure in the filesystem that I think is called a "directory". I assume that's simply an abstraction of the Catalog B-Tree and related files. I know about this use of the term "directory" from discussions and readings on Alsoft's DiskWarrior. That is supposed to do exactly what you want, "rebuild the directory structure", and is a relatively inexpensive "best-of-breed" solution.
    Gary
    ~~~~
       Imitation is the sincerest form of television.
             -- Fred Allen

  • Automator send unix command

    I am making a Automator script for ARD that lets me pick a computer list then run a unix command that runs softwareupdate.
    How is there a script will show the results of the command?
    I would like to have it display the updates that are need then I can have it run the command again and update the system.
    Anyone know about Automator

    You might be able to automate copying the report output to the clipboard and saving it that way, or through Automator and/or AppleScript (triggering the script through Automator), it might be possible to save the report directly, though I don't see anything obvious in the AppleScript dictionary for ARD that would make that possible. If no one else here has an idea, you might take the question up in the Automator or AppleScript forums.
    It would take a lot of AppleScript work to parse out the name of the update, though, if you want to fully automate the process rather than you just manually typing in the name of the update in the softwareupdate command.

  • How do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

    how do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

    killall "Remote Desktop"
    Regards.

  • Running commands on a remote UNIX machine

    I am very new to Java. Just wanted to get that out of the way. :)
    I have installed Websphere Application Developer and Websphere Application Server on my Windows 2000 PC and intend to use this machine to host some things I will create.
    One of the main things my tool will do is to maintain/check the status of a few AIX (IBM's UNIX) machines. The way I will do that is to run commands on these remote machines and examine their output.
    For example, someone would click a button on a servlet and it would then rsh to the machine and run "ps -ef" or whatnot and post the output back to the user.
    Usually I could do this from another UNIX machine using rsh or telnetting to it, however, my machine is windows 2000.
    Is there anyway I could do this?
    Any help would be much appreciated.
    Mike

    try looking into the apache jakarta commons library
    for telnet and other useful classes.
    http://jakarta.apache.org/commons/net/apidocs/index.ht
    Oh, I like this answer better - can I change mine? If you can do it from "inside" Java like this, all sorts of ugliness involving where things get installed on various machines and versions of Windows just go away.
    Grant

  • Run adobe cs3 updater remotely via command line unix command?

    is there a way to run the adobe updater from the command line for adobe cs3? I have a bunch of machines that already have cs3 installed, and I would like to be able to use ARD to "send unix command" and have the installer run and update the relevant apps?
    Thanks in advance...
    PS-is it me or is this forum ridiculously slow on safari? Sheesh!

    is there a way to run the adobe updater from the command line for adobe cs3? I have a bunch of machines that already have cs3 installed, and I would like to be able to use ARD to "send unix command" and have the installer run and update the relevant apps?
    Thanks in advance...
    PS-is it me or is this forum ridiculously slow on safari? Sheesh!

  • Can't Set Remote Login OFF via Send Unix Command systemsetup

    Trying to use the System Setup->Remote Login template in ARD to turn off Remote Login (SSH) in Sharing panel of System Preferences on Mac that is administered through Apple Remote Desktop.
    In Apple Remote Desktop (ARD), I select the client machine, then choose "Send Unix Command..." from the "Manage" menu. In resultant window, I pick "System Setup->Remote Login (SSH) from the "Template" drop down box in the upper right. That populates the upper window with Unix commands. I edit/change the "on" to "off" and tell the dialog to Run command as User: root, then click on "Send" button.
    Progress bar goes forever with no change.
    I can turn off Remote Login via ARD by controlling each client machine via an ARD WINDOW, then navigating to the Sharing Preference pane, but that process is tedious when performing for multiple client Macs.
    Strange, but I CAN use the "Send Unix Command..." outlined above to turn ON Remote Login, and get the status of Remote Login ("systemsetup -getremotelogin"). Just can't turn OFF Remote Login (quickly/efficiently).
    man systemsetup suggests I need to write the command as "setremotelogin -f off" but that failed with an improper command syntax error.
    Thoughts?

    It’s waiting for you to type a confirmation. If you run this command on the command line normally, you’ll see the message:
    Do you really want to turn remote login off? If you do, you will lose this connection and can only turn it back on locally at the server (yes/no)?
    Use this command instead:
    systemsetup -f -setremotelogin off

  • Unix command to send to remote computer

    I am looking for a unix command or automator action ( to use with ARD) to send to a remote mac that is running Safari. I would like to be able to reload a web page by using a unix command. Can anyone help me with this?

    You mean you're trying to load a local file that's saved on the remote computer? If that's what you're trying to do, you can use the Spotlight search (if the client is 10.4 or 10.5) or the File Search to find the file and then just launch it. If this will be repetitive with the same file name, you can save the task if you have ARD 3.x.

  • ARD 3.6.1 remote log in Unix command failure

    Hello, I am using 10.7.5 and ARD 3.6.1 and cannot figure out how to remotely log in to another computer
    I wish to remotely log in using ARD to multiple computers in my network, up to 30 at a time for elementary students.  I can observe, control and send Unix commands to the machines when they are at startup log in screen or in use. This is the Unix command I am trying to use to log into the comptuer using ARD and Unix command function.
    osascript -e 'tell application "System Events" to keystroke "login"'; \
    osascript -e 'tell application "System Events" to keystroke tab'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "password"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'
    **and yes I am changing the login and password keystroke**
    I have tried the above Unix command and several others but I get a message saying "A console user is not logged in on “studnetmacbook""  so I click the button to run command as user admin but then get the message below. 
    36:50: execution error: An error of type -10810 has occurred. (-10810)
    36:49: execution error: An error of type -10810 has occurred. (-10810)
    36:54: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    Could someone explain these errors.  Is ARD not compatible with remote log in with the versions I have?  I have seen on sites this is posted and other sites that this needs to be run as the root user...Should I know how to run this as a root user and if so could someone help me with how to do this? 
    Or if anyone else has a working command could you share it with me for remotely logging in using ARD.
    Thanks!

    Hi
    Don't quite recognise what it is you're using. Maybe try:
    osascript <<EOF
    tell application "System Events"
    keystroke "whateverusernameyou'reusing"
    keystroke tab
    delay 0.5
    keystroke "whateverthepasswordis"
    delay 0.5
    keystroke return
    end tell
    EOF
    Instead. Works every time for me.
    The above are all on separate lines.
    HTH?
    Tony

Maybe you are looking for

  • Spanish Char

    Hi. We have an EP and I can upload a file named  "España.pdf" in every folder in rootdocuments.... --> ok Also, I have an CM Respository Manager. I connected my KM to Windows folder. I cann´t create any file with spanish char (ej: España.pdf or camió

  • Os X Server 10.6.7 media in default blog won't play in Internet Explorer.

    I use the default web blog function in os x server to post some tunes I made in Garageband for my friends and family to check out.  These media files do not play in Internet Explorer, even when QuickTime is loaded on those computers. I have resorted

  • Create a BellSouth account with Mail.

    I just got my new MacBook, however, when I try to set up Mail with BellSouth.net it will keep trying to connect, but never will. I can't find any thing on the internet about how to set it up either. anyone else have the same problem, or solution?

  • Light/vintage effect in photo

    Hi guys, Does anyone know how I get the light/vintage/3D effect in photos like in the hair, face and blouse in the following photo? (In the program Photoshop.) I really like this photo and wondered how the designer pulled this off! Thanks

  • How do i reset my security questions if i dont know the answers?

    How do ireset my security questions if i dont know the answers?