Unix Command Needed

I would like to format a SATA drive that is connected with a USB adapter, but I am unsure how to do it without overwriting my internal drive.
diskutil resizeVolume disk0s2 200G "JHFS+" 4-Linux 30G "MS-DOS FAT32" 4-Windows 0b
The command above was copied from another forum. I couldn't remember if it has a typo that needs to be fixed (0b to 0G?).
I assume that disk0s2 needs to be changed, but I cannot figure out what my external drive would be named. Please advise.

diskutil resizeVolume disk1s3 200G "JHFS+" 4-Linux 30G "MS-DOS FAT32" 4-Windows 0b
Thanks, that worked perfectly!
This worked, but I now see that UNIX was not needed to make it happen. I'm stumped why so many forums regarding triple booting a Mac don't use Disk Utility instead of UNIX. Not to mention, I found one that had bad syntax, and I had to keep searching to find one that worked.
The Linux partition was formatted in Mac OS Extended Journaled. Linux must be able to see the partition when installing, and then it probably reformats to a non-Apple scheme before installation begins. Since it cannot be mounted by OS X when booting into X, it may be defaulting to ext3 format. In Disk Utility, it shows up as disk0s3, and it is grayed out.

Similar Messages

  • Working Code from Unix Command, needs fixing!

    /* Codes needs modification to run and display in GUI, will run and produce output in terminal, but will not display in GUI with setText and getText */
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class UnixCommand extends JFrame
    private JComboBox comboBox;
    private JTextArea displayArea;
    private JPanel mainPanel, displayPanel, comboPanel;
    private String names[] = { "Check Processes", "Check Network Connectivity",
                        "Check Remote Users", "Check Share Devices" };
    TitledBorder selectBorder, displayBorder;
    public UnixCommand()
         super( "Unix Command Tools in GUI" );
         Container container = getContentPane();
         mainPanel = new JPanel( new BorderLayout() );
         container.add( mainPanel );
         displayPanel = new JPanel();
         comboPanel = new JPanel();
              mainPanel.add( displayPanel, BorderLayout.CENTER );
              mainPanel.add( comboPanel, BorderLayout.NORTH );
                   comboBox = new JComboBox( names );
                   comboBox.setMaximumRowCount( 3 );
                   comboPanel.add( comboBox );
                        selectBorder = BorderFactory.createTitledBorder( "Select the Task to Perform" );
                        selectBorder.setTitlePosition( TitledBorder.TOP );
                        comboPanel.setBorder( selectBorder );     
                   displayArea = new JTextArea( 22, 40 );
                   displayPanel.add( displayArea );
                        displayBorder = BorderFactory.createTitledBorder( "The Command Output Selected" );
                        displayBorder.setTitlePosition( TitledBorder.BOTTOM );
                        displayPanel.setBorder( displayBorder );
    String s = null;
         displayArea.setText("\tHere is the standard output of the command:\n");
    try
                             // run the Unix "ps -ef" command
    Process p = Runtime.getRuntime().exec("ps -ef");
    BufferedReader stdInput = new BufferedReader(new
    InputStreamReader(p.getInputStream()));
    BufferedReader stdError = new BufferedReader(new
    InputStreamReader(p.getErrorStream()));
                        // read the output from the command
    System.out.println("Here is the standard output of the command:\n");
    while ((s = stdInput.readLine()) != null)
    System.out.println(s);
                        // read any errors from the attempted command
    System.out.println("Here is the standard error of the command (if any):\n");
    while ((s = stdError.readLine()) != null)
    System.out.println(s);
    System.exit(0);
    catch (IOException e)
         System.out.println("exception happened - here's what I know: ");
         e.printStackTrace();
         System.exit(-1);
    setSize( 500, 500 );
    setVisible( true );
    public static void main( String args[] )
         UnixCommand application = new UnixCommand();
         application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }

    All files are regenerated if changed.
    That goes for the .java and the .class files that are created. The jsp server checks to see if the current version is the latest. If it is, nothing gets changed or recompiled. If things are different, programs are recompiled.
    Youll notice that if you have a new jsp it always takes longer the first time. Or even when you change a jsp, the first time takes the longest for the page to come up in a browser. This is because of recompiling.
    Does this make any sense?
    Adam

  • SAP related UNIX commands needed.

    Dear All,
    I am new to unix environment, we have HPUX OS.
    Please provide me frequently used Unix commands related to SAP.or document please send it to me at [email protected] or paste it here.
    appreciate your early response.
    Regards,
    SM

    Hi again. The commands like ps -ef or grep is not special commands for SAP,it's commands for HP-UX, you can read
    about him on HP forums or HP documents...
    The links -->
    1) Technical documentation http://docs.hp.com/
    2) Online help - home http://www12.itrc.hp.com/service/help/onlineHelpHome.do?admit=109447627120628628184728353475
    3) Forums --> hp-ux technical documentation
    http://forums11.itrc.hp.com/service/forums/categoryhome.do?categoryId=475
    If you interest some commands only run search on the HP forum.
    Regards. Award if helpful.

  • Unix command needed to search alert log

    Hi. Im trying to search the alert log file to see if there is any thing related to the checkpointing process.
    Specifically Im looking for anything that includes "Checkpoint not complete".
    If anyone knows the command for searching the file in UNIX for this then please post here!
    Many thanks
    DA

    Hi Dan,
    "Checkpoint not complete".In UNIX try: http://www.dba-oracle.com/op_unix_16_cat_grep_commands.htm
    grep "checkpoint not complete" /u01/app/..../alertSID.log
    In Windows:
    http://www.dba-oracle.com/t_windows_alert_log_script.htm
    I e-mail myself important alert log messages, using this technique:
    http://www.remote-dba.cc/oracle_tips_table_alerts.htm
    Also, you can read the alert log from SQL, if you want:
    http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

  • Need a unix command

    Hi all,
    I just can't figure this out... I need a unix command that will backup any file matching a specific file extension AND the directory structure those files are in into a separate directory or volume. In other words, let's say that I have the files and directory structure below. I want to backup all of the txt files as separate files (not a tar archive) without writing the img files, without overwriting one txt file with another, and preserving the directory structure.
    foo/bar/a.txt
    foo/bar/b.txt
    foo/bar/a.img
    foo/bar/b.img
    foo/me/a.txt
    foo/me/b.txt
    foo/me/a.img
    foo/me/b.img
    foo/me/you/a.txt
    foo/me/you/b.txt
    foo/me/you/a.img
    foo/me/you/b.img
    I've read the man pages for ditto and rsync... they're geared toward backing up every file in a directory, and so they're not very clear about how to backup one single file type/extension.
    Everytime I try different varients of the rsync command, I either get errors "rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-24.1/rsync/main.c(717)", or file not found, or it overwrites the 'a.txt' with a different 'a.txt' without preserving the directory structure.
    Can someone give me the exact syntax for backing up the .txt files in the example above to an external disk (e.g. /Volume/backup)???
    Thanks!

    OK... my example was oversimplified. There are tons of different types of files in my directories (*.img, *.gif, *.etc), and I only want to cp one type (e.g., .txt).
    So, I started with the --include flag using the following command:
    rsync -nav --include *.txt foo/ /Volumes/baz/
    the result listed every file in foo (e.g., *.txt, *.img)
    I thought that perhaps the \*.txt should be *.txt
    rsync -nav --include *.txt foo/ /Volumes/baz/
    the result listed every file in foo (e.g., *.txt, *.img)
    rsync -nav --include "*.txt" foo/ /Volumes/baz/
    again, the result listed every file in foo (e.g., *.txt, *.img)
    Clearly, the --include flag wasn't working as I expected it to work. So, I decided to try the --exclude flag:
    rsync -nav --exclude "*.img" foo/ /Volumes/baz/
    Now, the results listed every file in foo except the *.img files.
    I needed to exclude other files as well, so I tried:
    rsync -nav --exclude "*.img *.etc" foo/ /Volumes/baz/
    Now, the results listed every file in foo INCLUDING the *.img files. So, adding additional file types within quotes broke the original command.
    rsync -nav --exclude *.img *.etc foo/ /Volumes/baz/
    Now, I get the error "rsync: link_stat "/Volumes/HD/foo/*.etc" failed: No such file or directory (2)"; and all .etc files are still included
    Now I tried:
    rsync -nav --exclude *.img --exclude *.etc foo/ /Volumes/baz/
    Now, this excluded both *.img and *.etc files. I have about 20 file types other than *.txt ... there has to be some other way!!!
    PowerMac Dual 2.7GHz G5 Mac OS X (10.4.9) 4.5GB RAM

  • Unix command sorely needed

    Hi
    Our tmp file was rammed up to 98% early this morning and I was called to deal with it.
    I needed to see the largest files then decide if we could eliminate them.
    I really need a Unix command that will list the largest files first (or last) from a given directory.
    Does this command exist? I already tried googling to meagre avail.
    Thanks.
    AIX 5.2
    9.2.0.2
    DA

    Hi Dan,
    I really need a Unix command that will list the largest files first (or last) from a given directory.Here is how I do it, using the "find" command:
    http://www.dba-oracle.com/t_unix_script_find_files_older_date.htm
    Finding large files on Linux
    The following command is very useful in cases where a Linux file system has become full. As we may know, Oracle will hang whenever Oracle must expand a tablespace and Oracle cannot extend the UNIX filesystem.
    When a UNIX file become unexpectedly full, it may be because Oracle has written a huge core or trace file into the UNIX filesystem.
    The script below will display all files that are greaten then one megabyte in size. Note that the size parameter is specified in K-bytes.
    root> find . -size +1024 –print
    ./prodsid_ora_22951.trc
    Of course, you can easily append the xargs of –exec command to automatically remove the large file:
    root> find . -size +1024 –print|xargs –i rm \;
    This find command will do a "stats" on all files in a directory structure, showing the total size of all files in the directory. You can also incorporate the "df -k" command"
    find ${START_DIR} -mtime -${DAYS} |xargs stat -c "%s"|awk '{sum += $1}END{print sum}'
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • What is the absolute client permission needed to receive Unix commands?

    The ARD error "This task is not authorized on (computerName)" is forcing me to allow almost all the privileges in the Remote Management section of client computer's Sharing System Preferences. I've already had to add:
    "open and quit applications"
    "change settings"
    "delete and replace items"
    "restart and shutdown" (see this Apple document's suggestion for Unix commands)
    "copy items"
    It makes no sense to my why 'Generate reports' must also be added, but clicking it off makes the error return. I'm just triggering a Unix command that goes something like "echo 1" and runs as root on the one test computer (and potentially dozens, so it wouldn't be pretty changing settings in that many) If it helps, the ARD host is 10.6.7 with ARD 3.4 (installed via the App Store a couple weeks ago) and the clients are 10.4.11 and 10.5.8.
    I'm preparing documentation for ARD and some clients installing our software will not warm to the idea of widening up the permissions footprint. Potentially dozens of computers will need to be retweaked, even if they wouldn't have to leave their seat.
    We also will need to deploy a pkg installer, so some of those may need to remain checked, but ...
    What is the absolute client permission needed to receive Unix commands?
    Thanks

    Have you tried sending it as User: Root
    To my knowledge with that setting you do not need any client permissions as a unix command used as Root overides any permission set. If this is something you need to do often I do know for a fact you can make the report task up use send as Root and tell it to save as template. After this you will be able use the templte to make things a bet quicker. I believe in oder to do this you must enable root user open Directory Utility in order to do this. Keep in mind root has full permissions and any command you enter with unix will be executed as such. This is a word around in the way that the normal client users do not need to have permissions enabled, also having root available at times is handy in stick situations.

  • UNIX command in ABAP code

    Hi All,
    I need to use unix command (MOVE) in ABAP code for transfering a file from one directory to another directory.
    Can any one help with how to used unix commands in ABAP?
    Thanks in advance.
    Regards,
    Hemendra

    The recommended approach always used to be to use transaction SM69 to define a "soft" command name to the operating system command so that it could be configured to work across Windows, Unix etc.  For example:
    Command name       OS         Type             OS command                                 Parameters for operating system command 
    Z_FILE_MOVE        SunOS      Customer    mv                                                 ? ?   
    You can then call function module SXPG_COMMAND_EXECUTE (quite well documented) to actually perform the command passing in the appropriate number of parameters.
    Jonathan

  • Unix commands in ABAP

    Hi,
       I need to call the following unix command in ABAP to encrypt a file on the app server .
    crypt password <org filename> new_filename
    1 But when i run it using call 'SYSTEM' .. i get message security risk , command not executed ..
    2 I also created the command in SM69 and tries to run it but same error.
    3 I also created a shell script , but i get another message when i try to run sh ...
      Please help to find out a way to make it work ..
    Kunal

    Hi kunal,
    1. probably ur basis team might be able to help u.
    2. even if we have authorisations thru sap
       to run external os command,
       the actual OS user on application server
       must have the right for it
       and access/write/read/modify
       for the files (provided thru the command)
       in question.
    3. Due to this , the systems gives the message
       of SECURITY RISK.
    regards,
    amit m.

  • Is there a way to change the VNC password thru unix command in ARD2?

    In a local network, I get access denied errors from macs that have the vnc password different than the Administrative login user password. I needed to change the Admistrator password which I did thru the Unix command in ARD2.
    Now.
    Is there a way to change the VNC password thru unix command in ARD2?
    Example:
    remote computer setup
    Panther 10.3.9
    vnc password - gopher
    user ID - testARD with admin rights
    user password - backdoor
    ARD2 Computer setup
    10.4.10
    login ID - testARD
    password - backdoor
    I get the blue icon but get an 'access denied' error.
    I change the password from backdoor to gopher.
    I get the red with dash icon but, can get access to the computer.
    What is going on? Is ARD2 using the VNC resource instead of ARDs resources?

    A quick search of Google finds this <http://www.macgeekery.com/tips/cli/settingremote_desktops_vnc_password_interminal>. I have not tested this myself.
    bill

  • Unix command in ARD to remove DNS Servers from Network prefs?

    I need to know how to send a unix command to remove DNS Servers in Network preferences. I need the DNS Servers field to be blank. Can this be done?

    Our network administrator is getting ready to change the IP address of our DNS server. This means I have over 30 Macs that will be needing changes to their DNS settings. Since each machine is setup with limited access to the system prefs, that means I have to go to each machine and log in as the admin user to make this change. In the interest of saving time, is this something I can do with Remote Desktop and how? Would I use the same commands in this post and replace dns1 with our DNS' new IP address? Will this distrupt the users access to the network when I do so?
    Thanks for any help.
    Beth

  • How to execute unix command through odi and store the result in table

    I have to reconcile  if data is loaded in table from csv file or not . I have to create a oracle data integrator package/interface/procedure to execute unix command to count number of rows in the csv files and store the count result in a table then i have to query the loaded table and count number of rows there and store in the table and have to compare is counts are same or not,  Please assist me how to make package/interface/procedure to  execute unix command and store result in oracle table.
    Thanks in Advance

    Use ODI OS command tool in the ODI package.
    create an interface in ODI using LKM File to Sql and the output file generated with the csv file's row count as a source and the db table(where the count needs to be stored) as a target

  • Execute Unix command on login

    Hello, is it possible to execute a unix command on user login?
    I want that every time a user login on a mac at my company, a unix command be executed.
    Is this case, this is the command: defaults write com.apple.mail NSPreferredMailCharset "UTF-8"
    thks in advance

    {quote}Loginwindow Scripts
    Another way to run applications at login time is to launch them using a custom shell script. Mac OS X provides two options for launching scripts when the user logs in. When creating your script file, keep the following in mind:
    * The permissions for your script file should include execute privileges for the appropriate users.
    * Scripts launched by loginwindow are run as root. Therefore, you should thoroughly test your scripts before deploying them to make sure they do not adversely affect the user's system.
    *In your script, the variable $1 returns the short name of the user who is logging in.
    * Other login actions wait until your hook finishes executing. Therefore, have your script do what it needs to do quickly and then exit. {quote}
    I want the script to be run as the current user that does the login, and not as the root. I think that if its run as root, it changes nothing in the user. Does this root issue apllies to the Zerwas method?
    It depends on how Zerwas was thinking you'd implement it. If you added it to each user's login items, it should run as the user. If you create a startup item to run it, it will run as root. I'm assuming Zerwas was suggesting the former because there would be no point in wrapping the shell script in an AppleScript if you are going to turn it into a startup item.
    What you might be able to do - at least with the loginwindow script - would be to explicitly run the command as the user by making use of the fact that the user name is passed to the loginwindow script as $1. I've never used loginwindow scripts but it seems as though it should work.
    Another possibility would be to use a LaunchAgent. These are really intended to manage background processes, though, and it seems an unnecessary use of resources to load one which will only ever be run at startup.
    Can I ask why you wish to run the script every time a user logs in? Is the concern that the default will get set to something else and needs to be reset regularly?
    - cfr

  • Using UNIX command to copy desktop files/folders

    Hello All. I need help using UNIX command(s) to copy text documents and or folders from my lab computers to my desktop at home. Since I have such a slow connection, I think this will work best. I need help with the cp command and the path mostly. Since all files would be in folders on the desktop (including documents (that "missed" the folders), I believe I could simply copy desktop contents? Thanks, J Langlois

    What you want to do is SCP (secure copy) your documents to your remote host.
    send this command to the computer with the documents
    scp ~/Desktop/FILEOR_FOLDERNAME USERNAME@REMOTE_COMPUTER:~/Desktop/
    Replace all the stuff in UPPERCASE with the correct vales for your situation.
    Mini (Intel Core Duo)   Mac OS X (10.4.8)  

  • Using Unix command lines in java code

    I was wondering if there was a way to run a unix command in java code. I know in C++ there is popen, but i don't know of a way in java. The command i need to run is the whois "domain name" command. Any help would be great!
    jarad

    try something like this:
      public static String whois(String domain) throws IOException {
        BufferedReader is = null;
        Process p = null;
        String result = "";
        p = Runtime.getRuntime().exec("whois " + domain);
        is = new BufferedReader(new InputStreamReader(p.getInputStream()));
        String line;
        while((line = is.readLine()) != null)
          result += line;
        return result;
      }

Maybe you are looking for

  • HT1349 How do i register a pre-owned ipad in my name

    How do i re-register a pre-owned ipad in my name? An ipad that is registered in another person's name, but its sold to me. How do i register it in my name. NOTE: Am getting this message in my support profile "According to our records, this serial num

  • Select Expert Help

    Post Author: HappyOne CA Forum: Formula Hi, I am trying to filter out data from the database based on a specific date. For example, the user selects a date they wish to view. The report should return the active users at that time. So based on one dat

  • From 10.2.0.1 to 10.2.0.2

    Hi All, Os : SUSE LINUX 9 We have applied 10.2.0.5 patch on 10.2.0.1 .. we did not find any error during installation but when we take sqlplus we can see still the version is 10.2.0.1. Is this behaviour is normal ? or we did any mistake applying patc

  • Query on formating CSV file.

    Hi All, According to my business logic i need to read data from DataBase and need to create CSV file to represent that data. I am able to create CSV file. But i want to format the cells of the CVS file. means like, i want to change the back groung co

  • Date Comparison in PCR

    Hi Gurus, I want to compare the start date of Input table (P0014) with the Hiring action date and termination date of the employee store in infotype 0000 in the PCR while executing P0014. What operation i can use for this? Thanks and Regards. Muhamma