Search for System FIles

I have eight student servers running 10.5.4, and I would like to search the home directories for specific files to delete. For instance, in Tiger I could do a simple search for "com.apple.desktop.plist", get a nice list from all student homes where I could delete them en mass. In Leopard it seems not to search Library files. If in the finder search box I select "Other" I expect a list of attributes like System files, but unlike the desktop I sit at now the list is blank. Any ideas?
Thanks in advance.

Hi Ikern, you could try something like sudo find /path/to/users/networkhomedirectory/ -name "com.apple.desktop.plist" -exec rm '{}' \; in terminal changing the /path/to/users/networkhomedirectory/ to suit your set up and the "com.apple.desktop.plist" for the file you want to find.
This command will find all the files with that name in the location you point it to and delete them.
We used to use a similar command to delete the ._ files on our Windows Shares before the advent of dot_clean.
If you want a list of found files rather than delete them try find /path/to/users/networkhomedirectory/ -name "com.apple.desktop.plist" >> foundfiles.txt
this will create a txt file of the found files.
This may allow you to do what you want until the search function is fixed.
Cheers

Similar Messages

  • How to search for a file?

    Hi I am currently using the below code to detect a file automaticaly in a thumbdrive. So currently I have to state the path directory to detect the particular file. Is there a way to search for the file in the thumbdrive using Java?
    public class Detect {
    public static void main(String[] args)
    File f = new File("f:\\");
    while (! f.exists())
    try { Thread.sleep(500); }
    catch (InterruptedException e) {}
    System.out.println("drive inserted!");
    }

    You'll need to recursively search through a top directory and all its subdirectories for all files. Here is a link how to do this.
    http://www.javapractices.com/Topic68.cjp
    You can search for all drives A through Z for the file (using something like new File("F:") and catching the exception if not found (and dont do anything with the exception). But exclude C and D drive since they are usually hard drives and take forever to search through. Also, you may want to use File.separator instead of '/" or '\' in your code since windowsXP uses one while Unix uses the other and you would want your code to be able to run on either operating system.
    Are you building a web page with this? if so, it will not work since your search code would be running on the server and not on the client's machine. Even if you were able to run it on the client machine via his browser, you cant because of security reasons (end users dont want to give you access to thier drives). If its a web page, look into file upload html tag called <input type="file". This allows the end-user to navigate on his machine to where the file is and download it without you having to search for it.
    If you writing an application instead of a web page, I think there is an applet you can use that will do the same thing as <input type="file".
    Searching though a directory structure isn't good since it takes too long for users t wait.

  • Searching for a file in java

    What I am trying to do is not very uncommon. I want to open a file in it's default application (or at least in a common one.)
    Mainly I am currently thinking either HTML files or PDF's.
    What I was wondering is how to search for a file and get its directory path. For example I want to search for the file "Acrobat". In windows its directory is "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"
    But I know in MAC or Unix the path could be very different. Not only that, but what if they did not use the default installation directory. I just want to find the path of a file by invoking a search. Is there currently any way to do this?
    I know I can open a JFileChooser and make the user search and find the program they wish to run it in, but that certainly is not very user friendly. I'd rather the program just searched for the proper application(s) and then called the exec() method to run the file in the program.
    Any help is appreciated.

    java.io.File provides a listRoots() method that returns all file system roots. So for Windoze you'd get 'A:/', 'B:/' 'C:/' ... etc.
    Unix you'd get '/' and so on.
    Now you can use other File methods to recursively scan the roots.
    Here's some (untried) code to get you going that searches for all java.exe found on all roots.
    import java.io.File;
    import java.util.Arrays;
    import java.io.FilenameFilter;
    import java.util.List;
    import java.io.IOException;
    public class FindIt {
      public FindIt () {
        File[] roots = File.listRoots();
        List list = new ArrayList();
        for (int i = 0; i < roots.length; i++) {
          scan(roots,list,new FilenameFilter(){
    public boolean accept(File file, String name) {
    return new File(file,name).isDirectory() ||
    name.equals("java.exe");
    public static void scan(File path,
    List list,
    FilenameFilter filter) throws IOException {
    // Get filtered files in the current path
    File[] files = path.listFiles(filter);
    // Process each filtered entry
    for (int i = 0; i < files.length; i++) {
    // recurse if the entry is a directory
    if (files[i].isDirectory()) {
    scan(files[i],list,filter);
    else {
    // add the filtered file to the list
    list.add(files[i]);
    } // for
    } // scan
    public static void main(String[] args) {
    new FindIt();
    You will run into problems with some roots as they will be removeable media (cd's diskettes) or network drives (potentially huge number of dirs to scan). So I do not recommend that you search on all roots, but a subset.
    Dave

  • When i search for mp3 files spotlight shows id3 tags instead of filenames as it used to do !!! I DONT want that .. how can i disable it !!!!!???????

    when i search for mp3 files spotlight shows id3 tags instead of filenames as it used to do !!! I DONT want that .. how can i disable it !!!!!???????

    Sorry, my handful of mp3's had the file name as the id3 tag name.
    So, I am seeing the same thing as you.
    Oddly, a while back I was trying to help someone out in Mountain Lion that wanted to see the id3 tags in the Finder.
    It's all a bit silly. They should have added columns instead or changing it to tag song name.
    They are transitioning to having everything reflect the content and not the file system, so this may not be reversible.
    The best I think you can do is provide feedback: http://www.apple.com/feedback/macosx.html

  • Searching for Missing Files-Elements 5.0

    Elements 5.0--loaded photos from my camera using Elements.  Added some captions using Elements.  the next time I tried to retrive photos I got a screen saying "Searching for Missing Files"  and the system started scrolling through files.  Not sure why this is happening.

    Please post Photoshop Elements related queries over at
    http://forums.adobe.com/community/photoshop_elements

  • I have 3 older ext. hard drives that I've utilized many times. Today while searching for old files, one of the three is no longer recognized by my PowerMac.  Any suggestions?

    I have 3 older ext. hard drives that I've utilized many times. Today while searching for old files, one of the three is no longer recognized by my PowerMac. The drive is not listed in Disk Utility.  Any suggestions?

    Is the computer in you equipment line:
    Dual Core Intel Xenon
    (which is not a PowerMac but a Mac Pro) the one you are asking about, or do you have an older PowerMac?
    If a Mac Pro, their forums are here:
    Mac Pro
    and, as Mac Pros have a totally different architecture from the pre-2005 Macs this forum covers, you may not have the same issues that can affect the older models. If someone didn't notice your equipment line, you could get advice that doesn't apply.
    If you really have a pre-2005 PowerMac, read on.
    If the stubborn external is USB and does not have its own power brick (i.e., it gets power only from the computer's UBS ports--"bus powered"), it may not be getting enough power. As electric motors age, they can demand more power than when new, and the power available on any USB port is limited.
    The typical workabouts to making a computer recognize an aging, bus-powered USB drive are:
    Get a powered USB hub (has its own power brick
    Get a "Y" USB cable: 1 Meter USB 2.0 A to 5 Pin Mini B Cable - Auxiliary USB "Y" Power Design for external hard drives.
    The second gets power from two USB ports on the computer and often that's enough.
    Remember that the USB ports on your keyboard seldom provide enough power even for a thumb drive, so be sure to use the USB ports on the back of the computer.

  • How Can I Search for Media files by Length?

    I want know how can I search for media files (mov, mp4, flv and movie files in general) by their length?
    If this search function is confirmed as definitely not possible on the OS, I would appreciate someone recommending app that might be able to perform such a search?
    Many thanks

    No possible way. Because the files may be enoded with differing codecs, compression, etc., you can only sort by file size, not the 'length' of the movie files.
    Clinton

  • How to search for a file and copy it to somewhere else in terminal

    So basically how can I search for a file on my computer named "testingtesting.txt" and copy it to my desktop using terminal? I have very little experience in terminal, so I was going to try and use the mdfind command, then store that output as a variable, and use that variable as the source for the cp command, but I feel like there is probably a much simpler method. So basically how could I find a file named "testingtesting.txt", copy it, and paste it to my desktop using terminal.

    Is there any particular reason that you must use Terminal?
    You could just download the free EasyFind from the App Store and find the file quickly. Do whatever you wish with it.
    Good luck,
    Clinton

  • How can i search for multiple file names (images) in bridge?

    Hello everyone!
    Does anyone know how to search for multiple file names in bridge?
    That is to copy & paste something like this: _MG_2152, _MG_2177, _MG_2194, _MG_2195, _MG_2202, _MG_2212, _MG_2219, _MG_2261, _MG_2362, _MG_2401
    Not using several criterias in the search box that is. That takes too long.
    Thanks
    Steffen Rikenberg Photographer
    Oslo, Norway.
    www.steffenrikenberg.no

    Try this add-on [https://addons.mozilla.org/it/firefox/addon/find-all/ Find All]

  • Search for a file with part of a filename in a given folder.

    How can I search for a file with part of a filename in a given folder?
    Or can I change the columns in Advanced Search so that the heading is filename?

    thanks, Michel. it had occurred to me to put a scratch tag on the folder, but I was hoping for an easier way. in future I'll do as you suggest though, because it's easier than what I have been doing.
    daryl

  • Searching for a file

    Is there an easy way to modify how it works when you try and "find file".
    Now when I do a search for a file (let's say the file's name is "GREEN"), the OS finds hundreds of files where the word "Green" might be included.
    But what do I do if I just want the FILES named "GREEN" or "GREEN.01", etc... to be included?
    Thanks!

    Hello! Click on the "name" and "contains" boxes etc and a popup menu comes up allowing you to refine your search to name is et. Tom

  • Searching for a file in client backups - Window's Home Server 2011

    Here is my problem:
    I have great backups on WHS2011, but only need to restore a couple of files.  I am looking for a file a non-standard program uses, and it is not in any of the normal places.  I can restore the file if I can find it, but is there a way I can search
    for a file in these .DAT files?
    Many thanks.

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios.
     If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.
     In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.
     Thanks!
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • Searching for a file name?

    Hey Guys,
    Is there a way to fine the name of a text file? For example, I have 3 files 1235.txt, 2568.txt, and 2568.txt. I need to find one of these files and write user info into each one and then update the file with current user info.
    I was just wonder if there is anyway you could search for a file name?
    The reason I need to do this is because I want to store user details into seperate files, because I don't really want to use a random access file and using one file for all the users seems alot harder, when finding a file users info...
    Thanks Guys,
    The 31st Cook
    PS. I will post the code if required.... Thanks Again

    O yeah, I remember (google refresh my memory) this is what we were going to use in the first place except.. Because we must demo the program on completely locked down computers we can't install the drivers (that's what I was told) So, we can't use it...

  • Organizer. not able to turn off "automatic search for missing files"

    Organizer starts searching for missing files. files that i have deleted, and the programme just keep on forever searching for those already deleted files. When i try to turn off that function, the organizer just stops. Running the program on Imac 2010.

    That's the thing with the Elements Organizer - once you start managing your media in it you must also use it for all subsequent maintenance so that it retains integrity.
    To try and resolve the Find> all Missing Files crash problem go to File> Manage Catalogs and Repair your current catalog. Follow that with an Optimize. See if you can now find them without the crash.
    If Find> All Missing Files is still causing a crash, you could try File> Reconnect> All Missing Files. As that searches your entire hard disk for one image at a time, and will take a very long time if you did a lot of deletions with your EasyDuplicateFinder program, wait for it to finish examining your catalog then cancel the attempt to find each image. Now in your organizer each of the missing files thumbnails will have a question mark at top left - you can then delete these from the catalog. After you've done quite a few retry Find> All Missing Files again to see if it will run without crashing.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • How to search for duplicate files?

    Is there a quick and easy way to search for duplicate files? (and other space hogs) I would like to do some hard drive spring cleaning. Trying to free up some space. Any suggestions? Thanks in advance, Carl

    Here are some apps to try:
    Singular, http://www.emeraldion.it/software/macosx/singular.html
    DupeCheck, http://dfay.fastmail.fm/dupecheck/ (uses the terminal suff and Spotlight under the hood)
    FileBuddy, http://www.skytag.com/filebuddy/

Maybe you are looking for