How can i grep "wrong" dirs/files [SOLVED]

im tryin to write a little bash line or script.
it should manage to list all contents recursively of a directory and grep and print all files that have diffrent permissions as specified, same to dirs.
so i started off, no idea how
first thing is
ls -laR      ....... ive absolutley no idea how i can start off with scripts like that. dunno where to search or find a good/easy solution to things like that.
plz help me out with my bad scripting knowledge

hey thx!
yay, this is goin right direction.
although a
ls -laR | grep -v -rw-r--r--
doesn't work :?:
and would be cool, if i can define: "leave dirctories out" or "leave files out"
s.th. like
ls -laR | grep -v --without-dirs -rw-r--r--
edit: ok, leaving out directories woulb be with grep-option "-d skip" right?
edit2: want to archive s.th. like this
ls -laR /mnt/media/Musik/ | grep -d skip -v "-rw-r--r--"
but grep then doesnt work bcoz first thing is a "-" . How to go round this :S

Similar Messages

  • How can i reintall my backup files? (Solved)

    /dev/hda1   <---- /boot
    /dev/hdc1   <---- fat32
    i've done this:
    dd if=/dev/hda1 | gzip -cv9 | split -b 2040m - /mnt/hdc1/boot_backup.gz
    backup file is boot_backup.gzaa in /dev/hdc1
    how can i reintall my backup file to /dev/hda?
    cd /mnt/hdc1
    cat boot_backup.gzaa > boot_backup.gz
    gunzip boot_backup.gz
    dd if=/mnt/hdc1/boot_backup of=/dev/hda1
    That's it.

    Hello, can you please answer some questions so we may be able to help you?
    What is the product number for your Notebook? (please don't put the serial number)
    Here is a document that tells you how to find it.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00033108&cc=us&dlc=en&lc=en&product=5141487
    What application did you use to back up your files?
    What are your files backed up to?
    You say you reinstalled windows, do you mean you ran a recovery or did you load a new version of windows?
    Thank you.
    I am an HP employee
    Knowledge is power...Power to the people

  • How can I find out those files whose name has space character?

    Hi
    How can I find out the files whose name has space character in a whole file system?
    Thanks
    Jerry

    thank you all
    I can use this command to find out like
    $find ./ -type f -exec ls -1 {} \; 2>/dev/null | grep " "
    ./space in name
    while, I modify above a little to find out a spcific file systems like below:
    $find /bbj* -type f -exec ls -1 {} \; 2>/dev/null | grep " "
    /bbj14/appl/oracle/prdrep/S_STATIC_TAB_05.dbf
    --while, I didn't see any space character in file name "S_STATIC_TAB_05.dbf"
    what is wrong?
    thanks

  • How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files?

    How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files? I need to look at several thousand PDF files. It takes too long to open each one individually. The only thing I could think of is combining them into large groups and then using the Navigation index. But I like the way windows Picture and Fax Viewer does it because you can keep the files separate. Combining PDFs causes loss of individual file names. That would be a problem since I do need to have the individual file names.

    Windows Picture and Fax Viewer is a DLL and is started via a rundll32.exe call and can't be set as an application to handle images in Firefox 3 and later versions.
    Try to set Windows Picture and Fax Viewer as the default viewer in Windows, then it should be listed automatically in the Mozilla Firefox Browse dialog.
    *http://www.winhelponline.com/articles/115/1/Windows-Picture-and-Fax-Viewer-as-the-default-viewer-in-Mozilla-Firefox.html
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How can I print multiple PDF files at once using Windows 7?

    How can I print multiple PDF files at once, on an HP LJ Pro 400 xcolocr printer without opening each
    one separately using Windows 7?

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at http://h30499.www3.hp.com/hpeb/
    I hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How can I print a prn file on HP6500; I have windows xp

    How can I print a prn file on HP6500; I have windows xp

    Perhaps some additional information would be helpful.  Does the HP6500 refer to a printer?  If yes, is the print driver and software installed on the computer that has XP?  I assume "prn" refers to some picture file or not?
    My crystal ball is in the shop and Teresa ( long Island median ) is out on a house call.
    {---------- Please click the "Thumbs Up" to say thanks for helping.
    Please click "Accept As Solution" if my help has solved your problem. ----------}
    This is a user supported forum. I am a volunteer and I do not work for HP.

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • How can I set a default file for JFileChooser

    Hi. I am developing a p2p chat application and I have to unrelated questions.
    1. How can I set a default file name for JFileChooser, to save a completly new file?
    2. I have a JTextArea that I append recieved messages. But when a message is appended, the whole desktop screen refreshes. How can I prevent that?
    Hope I was clear. Thanks in advance.

    Thank you for the first answer, it solved my problem. Here is the code for 2nd question, I've trimmed it a lot, hope I didn't cut off any critical code
    public class ConversationWindow extends JFrame implements KeyListener,MessageArrivedListener,ActionListener,IOnlineUsrComp{
         private TextArea incomingArea;
         private Conversation conversation;
         private JTextField outgoingField;
         private JScrollPane incomingTextScroller;
         private String userName;
         private JButton inviteButton;
         private JButton sendFileButton;
         private JFileChooser fileChooser;
         private FontMetrics fontMetrics;
         private HashMap<String, String> onlineUserMap;
         public void MessageArrived(MessageArrivedEvent e) {
              showMessage(e.getArrivedMessage());
         public ConversationWindow(Conversation conversation)
              this.conversation=conversation;
              userName=User.getInstance().getUserName();
              sendFileButton=new JButton("Dosya G�nder");
              sendFileButton.addActionListener(this);
              inviteButton=new JButton("Davet et");
              inviteButton.addActionListener(this);
              incomingArea=new TextArea();
              incomingArea.setEditable(false);
              incomingArea.setFont(new Font("Verdana",Font.PLAIN,12));
              fontMetrics =incomingArea.getFontMetrics(incomingArea.getFont());
              incomingArea.setPreferredSize(new Dimension(300,300));
              outgoingField=new JTextField();
              outgoingField.addKeyListener(this);
              incomingTextScroller=new JScrollPane(incomingArea);          
              JPanel panel=new JPanel();
              panel.setLayout(new BoxLayout(panel,BoxLayout.PAGE_AXIS));
              panel.add(inviteButton);
              panel.add(sendFileButton);
              panel.add(incomingTextScroller);
              panel.add(outgoingField);
              add(panel);
              pack();
              setTitle("Ki&#351;iler:");
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              setLocationRelativeTo(null);
              addWindowListener(new CloseAdapter());
         //Sends the message to other end
         public void keyPressed(KeyEvent e) {
              if(e.getKeyCode()==KeyEvent.VK_ENTER && e.getSource()==outgoingField)
                   String message=outgoingField.getText();
                   if(message.equals("")) return;
                   showMessage(userName+": "+message);
                   conversation.sendMessages(userName+": "+message);
                   outgoingField.setText("");     
         //Displays the recieved message
         public void showMessage(String message)
              if(fontMetrics.stringWidth(message)>incomingArea.getWidth())
                   int mid=message.length()/2;
                   StringBuilder sbld=new StringBuilder(message);
                   for(;mid<message.length();mid++)
                        if(message.charAt(mid)==' ')
                             sbld.setCharAt(mid, '\n');
                             message=sbld.toString();
                             break;
              incomingArea.append("\n"+message);
    }

  • How can I convert a pdf file that's larger than 100MB to word

    How can I convert a pdf file that's larger than 100MB to word?
    I have just paid $20 to Adobe to get this facility but It won't work ,
    as the pdf is larger than 100MB,
    I actually believe that I have paid twice for adobe but I'll take this up with them,
    in the meantilme,
    do you have any suggestions, I really need this material in word urgently,
    many thanks
    Shanna

    If your files are this large, ExportPDF is the wrong tool for you. You need Adobe Acrobat, which runs locally and does not need to send your files to Adobe.

  • How can i get my saved files from 4.1 to show up on 5.n?

    how can i get my saved files from 4.1 to show up on 5.n?

    The document saving portion of the app was moved to the printer control app for the 5.0 update. You can use file sharing to copy the files from your device with 4.1, and then copy them in to the printer control app after. This can either be done wirelessly, or by USB through itunes. The document below will show you how to do both options to get them copied off of the device. Then you simply do the same steps in the printer control app to copy files back in.
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=120&prodSeriesId=...
    Jon-W
    I work on behalf of HP
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    Click the KUDOS STAR on the left to say “Thanks” for helping!

  • How can I attach a jpg file in a mail message as the file icon, not as an opened image in the text?

    How can I attach a jpg file in a mail message as the file icon, not as an opened image in the text?

    what's wrong with this picture

  • Premiere pro Encoded file having m4v & .wav & m4v.xmpse files how can i play this video file?

    Hello Guys,
    I am a beginner in Premiere ,just started learning.Created a project and wanted the finished project file as a bluray format,after 14 hours  adobe premiere pro(not encore) created all the above three files,what to do next? how can i play the video file?
    Kind advise pls

    Dear Mr,Hunt,
    You made my day....i felt its more than special a christmas day,thank's a Trillion..downloaded the MKV MERGE GUI ,within ten minutes job done!!!!!!!!!
    All my 16 hour rendering job is saved.End of the day i learned something new toooo.
    I would like to ask you a question which is not connected to this topic,i asked this question before in windows 7 forum but till date no body solved!!
    I am having few avi video files which having (avi.avi) extension i couldn't figure out how its occured(they all video files captured from samsung galaxy note,and appeared noraml avi files but became avi.avi i tried removing one extension,eventhough it says having one extension when you look in to the properties of that file you can see avi.avi ,the problem is eventhough it playable in vlc sometime,when i try to import to premiere pro -it says the file is corrupted.
    any idea??

  • :-)  How can we change the default file path for Bank file ( dmee ) ?

    Hi All,
    We encounter a problem.
    Electronic bank file ( created after a F110 run ) are created, in an automatic way to the DIR_TEMP directory. ( On the SAP server )
    How can we change the default file path for Bank files ( dmee ) ?
    We'd like to specify another path.
    Thx for your help.
    Erwan

    Hello,
    Make sure that you have created the directory in transaction code AL11 with the help of basis consultants.
    You can link your PC directory to the application server.
    You can maintain the path whether your file needs to get saved in OBPM4 against your DMEE structure example GB_BACS etc.
    If you do not maintain any path in OBPM4, then the file gets saved to temporary directory. If you give the directory path name in OBPM4, then the file gets saved to that directory with numbers 0001, 0002, 0003 etc till it reaches 9999 and reset from the beginning.
    If you give the path as well as file name as ABCD, then the file gets generated to that directory folder with ABCD0001, ABCD0002, ABCD0003 etc. till it reaches ABCD9999 and reset from the beginning.
    Hope this solves your problem.
    Regards,
    Ravi

  • How can i get the trace file

    Hi,
    I wanted to check the trace file to make sure that there is no login attempts happend through the forms with wrong username and password.
    how can i enable the trace file , where i have to write the commands and where i can see the trace file.
    I'm using oracle forms 6i
    could anybody help me.
    thanks
    Bcj

    This link is all about forms 9i, i'm working on forms 6i. but i have tried with following values
    TRACE_LEVEL_CLIENT=16
    TRACE_UNIQUE_CLIENT=TRUE
    TRACE_FILE_CLIENT=Test
    TRACE_DIRECTORY_CLIENT=c:\orant\net80\trace
    in sqlnet.ora file and it created a trace file whenever it connected to database through the on_logon trigger.
    if the username or password is invalid then the validations raise the form_trigger_failure exception. so there was no trace file. so i was unable to get the trace file to see the invalid login attempts.
    Thanks

  • How can i convert a .cda file to an mp3 file

    how can i convert a .cda file to an mp3 file

    Actually, CDA only represents a shortcut of audio track. In reality, it does not have any music file in it. That's the reason why you cannot play the files without the original CD in your computer drive. To solve this problem, you'd better convert your CDA files to the most common mp3 format. To know more about how to do that, you can refer to this article, hope it helps!

Maybe you are looking for

  • My iPhoto keeps freezing everytime i go into Preferences in the Menu

    I want to change some options but it just freezez every time. I have restarted the Mac, even rebuilt the Library. Not sure what the problem is what I can do. I am able to browse through my pictures no problem. Any help greatly appreciated.

  • The edit Link on my report form opens the page to create a new record.

    For some reason my applications edit link on the report form is opening a new blank entry instead of pulling the data that needs edited from that row. I just have a basic report and form. Where can I check this Edit button to see if it is linking to

  • CC desktop won't display apps

    I have installed CC desktop on my MacBook Pro with Yosemite, but when I launch CC desktop the only think I can't see are the apps, the spinning blue circle keeps circling and nothing happens. I've tried almost everything, uninstalled the cc desktop,

  • Product Codes and Reigons

    Hi Guys, Im compiling a database of nokia phones. I have some phones to be recorded and was wondering if there is any definitive list that signifies what the 'c' 's' 's-1' etc mean. I can locate RM codes for most of them here: http://europe.nokia.com

  • PPR on Update Page

    Hi all, I need to do a partial page rendering on an update page. I initialized the view object and calls the init method which calls handlePositionChangeEvent. However, I cannot get the values on vo in handlePositionChangeEvent althouth it has been i