The correct syntax for a recursive chmod command in Terminal

I need to set recursive permissions on an external HDD to '777' or 'all read&write'.
I have tried all of the following commands in Terminal:
sudo chmod 777 -r /Volumes/...
sudo chmod -r 777 /Volumes/...
sudo chmod a+rw -r /Volumes/...
sudo chmod -r a+rw /Volumes/...
...all of which being back a 'no such file or directory' error, e.g.
sudo chmod 777 -r /Volumes/232Gb
chmod: -r: No such file or directory
Can anyone confirm the correct syntax for this command?
Thanks in advance...
Message was edited by: ChippyDeluxe

If there were a solution that didn't involve using Terminal, I would prefer that.
The reason I ask is, since my old iMac died and I connected my iMac's external HDD to my MacBook, thousands of folders on my external HDD have 'stop signs' on them and require me to go to
Get Info -> Sharing & Permissions
...and add my MacBook username and set the privilege as "read and write". A bigger problem is, no backup software I've tried will back up this external HDD onto another external HDD any more, so I no longer have an up-to-date backup, which is very worrying.
I am looking for a way of fixing this, and the chmod command appears to be the answer.
Ideally, I don't want any permission restrictions on my external HDD at all, so I can connect it to any machine without problems.

Similar Messages

  • Can't figure out the correct syntax for this select statement

    Hello,
    The following statement works great and gives the desired results:
    prompt
    prompt Using WITH t
    prompt
    with t as
       select a.proj_id,
              a.proj_start,
              a.proj_end,
              case when (
                         select min(a.proj_start)
                           from v b
                          where (a.proj_start  = b.proj_end)
                            and (a.proj_id    != b.proj_id)
                        is not null then 0 else 1
              end as flag
         from v a
        order by a.proj_start
    select proj_id,
           proj_start,
           proj_end,
           flag,
           -- the following select statement is what I am having a hard time
           -- "duplicating" without using the WITH clause
            select sum(t2.flag)
              from t t2
             where t2.proj_end <= t.proj_end
           ) s
      from t;As an academic exercise I wanted to rewrite the above statement without using the WITH clause, I tried this (among dozens of other tries - I've hit a mental block and can't figure it out):
    prompt
    prompt without with
    prompt
    select c.proj_id,
           c.proj_start,
           c.proj_end,
           c.flag,
           -- This is what I've tried as the equivalent statement but, it is
           -- syntactically incorrect.  What's the correct syntax for what this
           -- statement is intended ?
            select sum(t2.flag)
              from c t2
             where t2.proj_end <= c.proj_end
           ) as proj_grp
      from (
            select a.proj_id,
                   a.proj_start,
                   a.proj_end,
                   case when (
                              select min(a.proj_start)
                                from v b
                               where (a.proj_start  = b.proj_end)
                                 and (a.proj_id    != b.proj_id)
                             is not null then 0 else 1
                   end as flag
              from v a
             order by a.proj_start
           ) c;Thank you for helping, much appreciated.
    John.
    PS: The DDL for the table v used by the above statements is:
    drop table v;
    create table v (
    proj_id         number,
    proj_start      date,
    proj_end        date
    insert into v values
           ( 1, to_date('01-JAN-2005', 'dd-mon-yyyy'),
                to_date('02-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 2, to_date('02-JAN-2005', 'dd-mon-yyyy'),
                to_date('03-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 3, to_date('03-JAN-2005', 'dd-mon-yyyy'),
                to_date('04-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 4, to_date('04-JAN-2005', 'dd-mon-yyyy'),
                to_date('05-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 5, to_date('06-JAN-2005', 'dd-mon-yyyy'),
                to_date('07-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 6, to_date('16-JAN-2005', 'dd-mon-yyyy'),
                to_date('17-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 7, to_date('17-JAN-2005', 'dd-mon-yyyy'),
                to_date('18-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 8, to_date('18-JAN-2005', 'dd-mon-yyyy'),
                to_date('19-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           ( 9, to_date('19-JAN-2005', 'dd-mon-yyyy'),
                to_date('20-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           (10, to_date('21-JAN-2005', 'dd-mon-yyyy'),
                to_date('22-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           (11, to_date('26-JAN-2005', 'dd-mon-yyyy'),
                to_date('27-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           (12, to_date('27-JAN-2005', 'dd-mon-yyyy'),
                to_date('28-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           (13, to_date('28-JAN-2005', 'dd-mon-yyyy'),
                to_date('29-JAN-2005', 'dd-mon-yyyy'));
    insert into v values
           (14, to_date('29-JAN-2005', 'dd-mon-yyyy'),
                to_date('30-JAN-2005', 'dd-mon-yyyy'));

    Hi, John,
    Not that you asked, but as you proabably know, analytic functions are much better at doing this kind of thing.
    You may be amazed (as I continually am) by how simple and efficient these queries can be.
    For example:
    WITH     got_grp          AS
         SELECT     proj_id, proj_start, proj_end
         ,     proj_end - SUM (proj_end - proj_start) OVER (ORDER BY  proj_start)     AS grp
         FROM     v
    SELECT       ROW_NUMBER () OVER (ORDER BY grp)     AS proj_grp
    ,       MIN (proj_start)                         AS proj_start
    ,       MAX (proj_end)               AS proj_end
    FROM       got_grp
    GROUP BY  grp
    ORDER BY  proj_start
    ;Produces the results you want:
      PROJ_GRP PROJ_START  PROJ_END
             1 01-Jan-2005 05-Jan-2005
             2 06-Jan-2005 07-Jan-2005
             3 16-Jan-2005 20-Jan-2005
             4 21-Jan-2005 22-Jan-2005
             5 26-Jan-2005 30-Jan-2005This is problem is an example of Neighbor-Defined Groups . You want to GROUP BY something that has 5 distinct values, to get the 5 rows above, but there's nothing in the table itself that tells you to which group each row belongs. The groups are not defined by any column in hte table, but by relationships between rows. In this case, a row is in the same group as its neighbor (the row immediatly before or after it when sorted by proj_start or proj_end) if proj_end of the earlier row is the same as proj_start of the later row. That is, there is nothing about 03-Jan-2005 that says the row with proj_id=2 is in the first group, or even that it is in the same group with its neighbor, the row with proj_id=3. Only the relation between those rows, the fact that the earlier row has end_date=03-Jan-2005 and the later row has start_date=03-Jan-2003, that says these neighbors belong to the same group.
    You're figuring out when a new group starts, and then counting how many groups have already started to see to which group each row belongs. That's a prefectly natural procedural way of approaching the problem. But SQL is not a procedural language, and sometimes another approach is much more efficient. In this case, as in many others, a Constant Difference defines the groups. The difference between proj_end (or proj_start, it doesn't matter in this case) and the total duratiojn of the rows up to that date determines a group. The actual value of that difference means nothing to you or anybody else, so I used ROW_NUMBER in the query above to map those distinct values into consecutive integers 1, 2, 3, ... which are a much simpler way to identify the groups.
    Note that the query above only requires one pass through the table, and only requires one sub-query. It does not need a WITH clause; you could easily make got_grp an in-line view.
    If you used analytic functions (LEAD or LAG) to compute flag, and then to compute proj_grp (COUNT or SUM), you would need two sub-queries, one for each analytic function, but you would still only need one pass through the table. Also, those sub-queries could be in-line views; yiou would not need to use a WITH clause.

  • What is the correct syntax for using a variable in an ad hoc query?

    Hi all
    I am an occasional DB user and at the moment need to update about 1000+ records so that a certain column gets a unique value.
    So I thought that I would use a variable for this.
    I then built this kind of SQL statement for just a small subset of the records:
    variable recNumber number;
    exec :recNumber := 1;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + recNumber
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');
    I get the invalid SQL statement error when attempting to execute above (besides the prompt that asks for a value which I would like to omit).
    Anyway I also tried this one:
    CREATE SEQUENCE seqCounter;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + seqCounter.NEXTVAL
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');
    From this one I got the error ORA-01722: invalid number...I am guessing this comes because seqCounter is of type number and the COL_TO_BE_UPD is of type character...(?)
    So what I would like to ask is what is the correct way to define and use a counter type of variable to append a number at the end of a character string?
    Also another question that I would like to ask is that are variables that are used in ad hoc queries also called 'bind variables'?
    Thanks muchly

    If you want to append a unique number to a column then this would do it:
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD ||to_char(rownum)
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');

  • What's the correct syntax for this?

    Hey guys
    If...
    trace(rowsHolder.getChildByName("mc"+newStr).y);  
    ...correctly outputs the y coordinate of (in this case) mc001, how do I output the y coordinate of a movieClip called item_base_mc that's within the timeline of mc001?
    trace(rowsHolder.getChildByName("mc"+newStr).item_base_mc.y);
    ...gives me a display object error.
    I've tried permutations of the above with [] brackets in various places, but haven't cracked the code.
    What would be the correct way to write it?
    Thanks for taking a look.
    Shaun

    I don't know how to really explain this, but from documentation you will notice  -   getChildByName()  -  is actually a function from  -  DisplayObject  - not MovieClip.
    Link here provides a better explanation!
    http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119
    GOOD LUCK

  • What's the correct syntax for animate scale

    I have tried to animate the scale transformation of an object from code.
    I had a little success with the code from here:
    http://stackoverflow.com/questions/5029035/how-do-we-add-css-animation-in-jquery
    But animating the scale looks jerky on the iPad with this hack.
    There must be an option of doing it from within Edge since a timeline animation which does the same (just transform scale of an object over time) runs smooth.
    I know there are jQuery extensions for things like that but I don't want to interfere with anything Edge does itself.
    Can someone give me a hint what syntax I need for animating the scale of an object within Edge?

    Hi Bittamer,
    There is no built-in code to animate objects. If you don't want to use the CSS scale code, you can use jQuery animate to animate the width and height props of your object, like so:
    sym.yourHeight = 500;
    sym.yourWidth = 500;
    sym.$("your_symbol").animate({height:sym.yourHeight, width:sym.yourWidth}, 500, 'swing');

  • What is the correct syntax for Sumif when condition is for a text string?

    B2 and b3 both contain the text "Grc".
    C2 contains 1 and C3 contains 2.
    F2 contains a Sumif that reads as: =SUMIF(B2:B10, "=Grc", C2:C10)
    The result is "0" when it should yield 3
    I can't figure out what happened.

    Hi ishii,
    Your screen shots make no sense to me. I am using Numbers'09 on a MacBook Pro running OS X. Please tell us what device, operating system and app you are using. You still have not told us.
    This forum is for Numbers on a Mac running OS X. Is your screen shot from an iOS device?
    I don't know anything about Numbers for iOS.
    Or are you using Excel?
    I can not help you. If you are using an iPad, you will get a better answer in this forum:
    https://discussions.apple.com/community/app_store/iwork_for_ios?view=discussions
    Regards,
    Ian.

  • What is the setVariable syntax for AS3

    Hi,
    I am having issues with setting a variable in AS3 SWF playing inside a Dir12
    spriteObjRef.setVariable(variableName, newValue)
    In the context of ActionScript 3, this method is only supported on a Flash object, not on a
    spriteObjectRef.
    What would the Flash Object syntax be??
    Thanks,
    Jim

    Jusclark-Oracle wrote:
    What is the correct syntax for referencing a page item (P23_ID, for example) in a PL/SQL page process, after submit?
    See "About Referencing Session State" in the documentation.
    Within an anonymous block in an APEX page process, use the standard bind variable syntax:
    :P23_ID
    In general, use bind variable syntax when referencing session state values in SQL or DML:
    select
        ename
    into
        :p23_name
    from
        emp
    where
        empno = to_number(:p23_id);
    and obviously when assigning values to the item:
    :P23_ID := foo.nextval;
    PL/SQL function references v('p23_id') and nv('p23_id') [for number values] must be used to access values in stored program units called from APEX, although it's usually better to pass the values as parameters: foo(:p23_id).

  • Cannot find correct syntax for paint()

    Hi everyone,
    I am supposed to create an applet that has a textfield component and a button comp. the user is prompted to type in a drawing command press the "go" button and the program executes. here is an exampls of what the text should read like..FD 50, turn SW, BK 50, colour red.
    The FD is forward draw and the BK is backward. my problem is I am not using the correct syntax conventions when creating xnew and ynew coordinates. this might not be the best algorithm either, but with limited examples and resources it was the best I could come up with, any other suggestions would be much appreciated.
    Here is the problem code.
    public void init()
                   extraPanel.setBackground (Color.blue);
                   extraPanel.setLayout(new FlowLayout());//resizable panel
                   extraPanel.setBackground(Color.red);
                   extraPanel.add(button); button.addActionListener(this);
                   extraPanel.add(Mylabel);
                   Mylabel.setBackground(Color.white);
                   extraPanel.add(tf);
                   tf.setBackground(Color.green);
                   add(extraPanel);
                    //create a method to use the cursor to draw
                    public void paint(Graphics page)
                       //declare the coordinates and variables
                       int x;
                       int y;
                       int xcurrent;
                       int ycurrent;
                       int xnew;
                       int ynew;
                       String turn;
                       boolean FD;
                       String sData = new String();
                       //create an array object of commands
                       //create a bufferedReader to read in data
                       BufferedReader stdin = new BufferedReader(new
                                              InputStreamReader(System.in));
                       //create an object of commands[]and set its size
                       comm = new Commands[20];                      
                       //create a String Tokenizer to read the data in from the tf
                       StringTokenizer tok = new StringTokenizer(sData, ",");
                       //read the data in
                       for(int i = 0; i < comm.length; i++)
                          sData = stdin.readLine();
                          comm[i] = new Commands(tok.nextToken(),Integer.parseInt(tok.nextToken()),
                                    tok.nextToken(),Integer.parseInt(tok.nextToken()));
                          //use x and y coordinates to draw the image
                          xnew =  new (Commands(turn.x)* FD * dist + xcurrent + colour);
                          ynew =  new (Commands(turn.y)* FD * dist + ycurrent + colour);
                          repaint(xnew + ynew);
                          //set the focus on the new lines
                          xcurrent = xnew;
                          ycurrent = ynew;
    }//end of logo class                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Maybe I'm being dense but I don't see a question in here anywhere. Unless it the xnew ynew thing. You can't use new to create an int, an Integer object yes, but not int so get rid of the "new"s. Next look at the methods in http://java.sun.com/products/jdk/1.2/docs/api/java/awt/Graphics.html
    And get rid of all of that BufferedReader stuff.
    you applet should have something like:
    TextField commands = new TextField("",20);
    Button btn = new Button("Draw It");
    String cmds = null;
    // add the button and text field to the applet
    // add an action listener for the button
    // in the ActionPerformed method do somthing like
    cmds = commands.getText();
    repaint();
    // in the paint method parse the cmds string and do the drawing via the Graphics class's methods
    That you give a good idea of where to go now.

  • What is the correct cable for iMac 11,2 Intel core i3, mini dvi to vga or mini display port to vga?

    What is the correct cable for iMac 11,2 Intel core i3, mini DVI to VGA or mini display port to VGA to hook up to projector? Thanks!

    mini-DisplayPort.
    Regards.

  • Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone (if you're using iOS 7), then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Ok... i am trying to sign into my apple account in the itunes store on my ipod and i have all the correct data for my credit card and it says " your payment information does not match your banks records. try again or nenter a new payment method. " help me

    ok... i am trying to sign into my apple account in the itunes store on my ipod and i have all the correct data for my credit card and it says " your payment information does not match your banks records. try again or nenter a new payment method. " what does this mean and how can i fix it??

    - See:
    ]iTunes Store: My credit card's security code or zip code does not match my bank's records
    - If still problem contact iTunes by:
    Contact iTunes

  • TS1702 The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar.  Actually, they post exactly 4 hours earlier than the correct time on my Yahoo Calendar.  Does anyone have a "fix" to correct the "time

    The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar. Actually, items post exactly 4 hours earlier than the correct time on my Yahoo Calendar.   My i4S is in the correct New York time zone.  Help?

    I posted this question a while ago and didn't receive any responses but there are a lot of people who have viewed it and 10 have said they have the same question so I thought I would update you that I added my nanny to my exchange server account (created an email for her) and I send all invites to that email address and they work.  So sending invites from an exchange server account to a non-exchange server account apparently is a bug so to solve it, get on an exchange server I guess.

  • Adobe encore the software that's used to decode the media is not available on this system. installing the correct decoders for the file you are working with may help correct the problem

    Hi,
      I got this message after importing about ten or so H.264 files that I encoded from Adobe media encoder.  "adobe encore the software that's used to decode the media is not available on this system. installing the correct decoders for the file you are working with may help correct the problem."
    The files we're shot with HD cameras.  Edited in Premiere Pro CS3.  I installed the update 3.0.1 with still the same error.
    I also tried a brand new project and after about ten or so files being imported into a timeline, the system crash.  I tried this twice....
        Thanks in Advance

    Hi Hunt,
           Here is the skinny.  A window base PC.  footage shot with HD sony HD cameras,  Project imported to Premiere CS3.  Once completed sent file to Adobe media encoder and render them as H.264 widescreen high Quality.  Imported them to Adobe Encore CS3.  After about ten files or so.  I got the error message.  Did all the basic trouble shoot like restarting the computer, got latest patch.  Even build a new test project with the same problem.
        Something else I read in the forums, is the encore will transcoded the project to Mpeg 2 anyway, after looking at my project I realized those few files were indeed untranscoded.  So it will be a double compression and I dont want that.  So, my new question is, what is H.264 good for ?????????? I was research that Mpeg 2 is a faster render but H.264 is a slower render but better quality.....
       what do you think ????
       Peter

  • I just got an iPod shuffle yesterday and I have downloaded the latest update for iTunes (10.7) and when I plugin it in it says that I have not got the correct software for the iPod

    I just got an iPod shuffle yesterday and I have downloaded the latest update for iTunes (10.7) and when I plugin it in it says that I have not got the correct software for the iPod

    What is the exact error message you are receiving?  Have you checked to make sure the connections on each end of the USB cable are nice and snug?
    B-rock

  • Is this the correct syntax to submit a job using DBMS_JOB.SUBMIT?

    Hello,
    Is this the correct syntax to submit a job?
    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;';
    v_interval VARCHAR2(1000) := 'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate, v_interval, false);
    COMMIT;
    END;
    Thanks
    Doug

    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'BEGIN
    PREPARE_ORACLE_TEXT_SEARCH; END;';
    v_interval VARCHAR2(1000) :=
    'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate,
    v_interval, false);
    COMMIT;
    END;
    About your error:
    PLS-00201: identifier 'PREPARE_ORACLE_TEXT_SEARCH'
    must be declared
    ORA-06550: line 1, column 96:
    PL/SQL: Statement ignored
    The problem is that the job cannot find the procedure
    (maybe own by an other user). The user who run the
    job is not the same as the owner of the package.
    Bye, AronYou forget the semicolon after END.
    But we don't need here begin - end Block.
    So it's OK.
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;'[b];
    As you right mentioned, it is probably problem with owner or typo in the name of procedure.
    Regards
    Dmytro Dekhtyaryuk
    Message was edited by:
    dekhtyar

Maybe you are looking for

  • Error while uploading Transport request

    Hi friends, Error while uploading transport request to the transport directory, we downloaded the trasnport request from one sap system which have a set of developments for example downloaded files are; control file: K900470.SAD and Data file: R90047

  • I have problem with lcations in SRM

    Hi, Can anyone tell me how to resolve this issue. I have got 2 user ids in two different company codes and those ids are in two different back end systems. So now i want to access the company code "A " and company code " B " and their locations . wha

  • OIM Managed server is frequently reaching maximum data sources count

    Hi All, We are using OIM 11.1.1.3.0 , Weblogic Version 10.3.3,database 11.2.0.1 for one of our client bank . Recently we encountered a problem that my oim managed server is being overloaded ,when we check the error i see data sources reaching maximum

  • Identifying Photos Not in Any Album

    Is there a way to create a filter that will list/identify all photos in the iPhoto library that are not associated with an album? iMac G5 Mac OS X (10.3.9)   Mac OS X (10.3.9)  

  • Compactrio - user interaction from a laptop

    I cant seem to find a basic example of what i would like to do I have been using a producer comsumer loop on a DAQmx system and it worked perfectly - my problem is when i moved my code onto a cRIO 9074 I seem to get locked out Im thinking there is an