How to list "unowned" files on my filesystem

I'd like to get a listing of all files on my filesystem that are not owned by any currently-installed packages.  I need to specify which directories to exclude, such as /var, /proc, /dev, /tmp, etc.  Is there a tool/utility to do that?  I could write a script for it, but don't want to reinvent the wheel if there's already a way to see that information.

Xyne wrote:
http://xyne.archlinux.ca/info/pacpal
pacpal --list-unpkgd [paths]
that's cool.
maybe you could also implement a `--find-corrupted-pkgs` that checks the checksums of all files in packages.

Similar Messages

  • How to list all files in a given directory?

    How to list all the files in a given directory?

    A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
    Print the name of the directory
    for each file in the directory:
    if the file is a directory:
    Print its contents recursively
    else
    Print the name of the file.
    Directory "games"
    blackbox
    Directory "CardGames"
    cribbage
    euchre
    tetris
    The Solution
    This program lists the contents of a directory specified by
    the user. The contents of subdirectories are also listed,
    up to any level of nesting. Indentation is used to show
    the level of nesting.
    The user is asked to type in a directory name.
    If the name entered by the user is not a directory, a
    message is printed and the program ends.
    import java.io.*;
    public class RecursiveDirectoryList {
    public static void main(String[] args) {
    String directoryName; // Directory name entered by the user.
    File directory; // File object referring to the directory.
    TextIO.put("Enter a directory name: ");
    directoryName = TextIO.getln().trim();
    directory = new File(directoryName);
    if (directory.isDirectory() == false) {
    // Program needs a directory name. Print an error message.
    if (directory.exists() == false)
    TextIO.putln("There is no such directory!");
    else
    TextIO.putln("That file is not a directory.");
    else {
    // List the contents of directory, with no indentation
    // at the top level.
    listContents( directory, "" );
    } // end main()
    static void listContents(File dir, String indent) {
    // A recursive subroutine that lists the contents of
    // the directory dir, including the contents of its
    // subdirectories to any level of nesting. It is assumed
    // that dir is in fact a directory. The indent parameter
    // is a string of blanks that is prepended to each item in
    // the listing. It grows in length with each increase in
    // the level of directory nesting.
    String[] files; // List of names of files in the directory.
    TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
    indent += " "; // Increase the indentation for listing the contents.
    files = dir.list();
    for (int i = 0; i < files.length; i++) {
    // If the file is a directory, list its contents
    // recursively. Otherwise, just print its name.
    File f = new File(dir, files);
    if (f.isDirectory())
    listContents(f, indent);
    else
    TextIO.putln(indent + files[i]);
    } // end listContents()
    } // end class RecursiveDirectoryList
    Cheers,
    Kosh!

  • How to list specific files in a directory

    Hi. I have a FilanemeFilter derived class which works fine. The problem I have is how do I list the files in the subdirectory of the current directory?
    I wrote sth like this but it doesn't work:
    File dir = new File( File.separator + "components");What am I doing wrong?

    Well, I know it doesn't work becouse I used the JFileChooser to check this out. I gave it as a constructor parameter. According to the docs if the given dir doesn't exist the JFileChooser opens the system default drectory, which under Windows happens to be MyDocuments folder. That's how I know.

  • How to list all files and directories in another directory

    I need to be able to list all the directories and files in a directory. I need to write a servlet that allows me to create an html page that has a list of files in that directory and also list all the directories. That list of files will be put into an applet tag as a parameter for an applet that I have already written. I am assuming that reading directories/files recursively on a web server will be the same as reading directories/files on a local system, but I don't know how to do that either.

    Hi,
    Here is a method to rotate through a directory and put all the files into a Vector (files).
          * Iterates throught the files in the root file / directory that is passed
          * as a parameter. The files are loaded into a <code>Vector</code> for
          * processing later.
          * @param file the root directory or the file
          *         that you wish to have inspected.
         public void loadFiles(File file) {
              if (file.isDirectory()) {
                   File[] entry= file.listFiles();
                   for (int i= 0; i < entry.length; i++) {
                        if (entry.isFile()) {
                             //Add the file to the list
                             files.add(entry[i]);
                        } else {
                             if (entry[i].isDirectory()) {
                                  //Iterate over the entries again
                                  loadFiles(entry[i]);
              } else {
                   if (file.isFile()) {
                        //Add the file
                        files.add(file);
    See ya
    Michael

  • How to list all files in my system

    Hi there,
    I want to list all files in my system. My system is Windows XP, can anybody help me please? Any can you recommend me if java is suit for such processing?
    Thx in advance.

    public void showFilesIn(File dir) {
        File[] files = dir.listFiles();
        for (int i = 0 ; i < files.length ; i++)
            if (files.isDirectory())
    showFilesIn(files[i]);
    else
    System.out.println(files[i]);
    showFilesIn(new File("C:\\"));
    notice that it won't show directories, but only files

  • How to list the files I saved in //var/mobile/ApplicatiDocuments directory?

    I want to list the JPG files in the directory of /var/mobile/Applications/XXXXXX/Documents. Have any API like [[NSBundle mainBundle] pathsForResourcesOfType:@"JPG" inDirectory:path]; to list the files? Thanks. Kevin.

    I think you can just do something like this:
    NSArray *paths = NSSearchPathForDirectoriesInDomains
    (NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSLog(@"documentsDirectory=%@", documentsDirectory);
    NSArray *docDirContents = [[NSFileManager defaultManager]
    directoryContentsAtPath:documentsDirectory];
    for (NSString *fileName in docDirContents)
    if (![[fileName pathExtension] caseInsensitiveCompare:@"jpg"])
    NSLog(@"fileName=%@", fileName);
    - Ray

  • How to list the files in a directory which are recently modififed few mins

    Hi,
    I need command to list the files in a directory which are modified few minutes ago in SunOS. like "find . -cmin 2 -print " which list files that are modified 2 mins ago in Linux platform.
    Thanks in advance.
    sudha85

    The find command that comes with solaris doesnt have the cmin operator. Only mtime whose option is days.
    So install gnu find from sunfreeware which is the same one that comes with linux.

  • How to list all files in directories

    Here's what I'd like to do, and I know there's a genius on this forum that knows the answer:
    Let's say I burn a disc with lots of folders and files. How could I see a list of all those folders with their included files in one easy to read place? Like, could I go to Terminal and list the contents of the disc in kind of a directory tree sorta layout that could be copied to a text document?
    I have several dozen discs of data I've burned over the years, and when I want to find a certain file, I have to open the disc and manually click thru all the folders to see their contents until I find what I'm looking for. I'd like to make an "index" of each disc so I can find things faster, or better, list the folders/files in a text file I could save, 1 per burned disc. Does this make sense. Is this do-able?

    That works pretty sweet, too. As with other techniques, a lot of output to filter thru, hard on the eyes, might kill a printer, I dunno. As far as the output itself... what is this command asking for, in English, like, "Ms. Terminal application: please list ..." What? (the " -lR part)
    And the results:
    /Users/rob/Desktop/Websites/ARP-new content,May 2008/arp new ens/new vert en:
    total 752
    -rw-r--r-- 1 rob rob 48593 Jun 3 16:28 608v1_en.jpg
    What's the "total 752" mean?
    What's the "1" in front of the "rob rob" part?
    Apparently the date only shows the year if it's other than this year?
    I noticed Terminal doesn't like spaces in path names, like "/Users/rob/Desktop/My Best Folder Ever",
    should I rename everything like "MyBest_FolderEver", or is there a workaround for name spaces? Just some curiosity. Do you know of a concise, easy to digest guide to commands in the Terminal? It's something I'd like to learn more about. And thanks for the DIRECT answer to my original post.

  • How to list long file names and paths longer than 260 characters in vbscript?

    Hi there,
                   I have looked in different posts and forums, but couldn't find an answer to my question.
    So, here it is... imagine the small piece of code attached below. I need to be able to iterate and rename recursively (I didn't include the recursive part of the code in order to keep things simple) through files and folders in an user selected path. I thought that by using vbscript FileSystemObject I would be able to do so.
    Unfortunately, it seems like the Files method does not detect files whose path is larger than the OS 260 (or 256?) character limit. How could I do it so? Please, don't tell me to use something different than vbscripts :-)
    Thanks in advance!
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = FSO.GetFolder(Path)
    Set colFiles = objFolder.Files
    For Each objFile In colFiles
    Wscript.Echo "File in root folder:" & objfile.Name
    Next

    Yes, that describes the problem, but not the solution - short of changing the names of the folders. There is another solution.  That is, to map a logical drive to the folder so that the path to subfolders and files is shortened.  Here is a procedure that offers a scripted approach that I use to map folders with long names to a drive letter and then opens a console window at that location ...
    Dim sDrive, sSharePath, sShareName, aTemp, cLtr, errnum
    Const sCmd = "%comspec% /k color f0 & title "
    Const bForce = True
    if wsh.arguments.count > 0 then
      sSharePath = wsh.arguments(0)
      aTemp = Split(sSharePath, "\")
      sShareName = aTemp(UBound(aTemp))
      cLtr = "K"
      with CreateObject("Scripting.FileSystemObject")
        Do While .DriveExists(cLtr) and UCase(cLtr) <= "Z"
          cLtr = Chr(ASC(cLtr) + 1)
        Loop
      end with
      sDrive = cLtr & ":"
    Else
      sDrive = "K:"
      sSharePath = "C:\Documents and Settings\tlavedas\My Documents\Script\Testing"
      sShareName = "Testing"
    end if
    with CreateObject("Wscript.Network")
      errnum = MakeShare(sSharePath, sShareName)
      if errnum = 0 or errnum = 22 then
        .MapNetworkDrive sDrive, "\\" & .ComputerName & "\" & sShareName
        CreateObject("Wscript.Shell").Run sCmd & sDrive & sShareName & "& " & sDrive, 1, True
        .RemoveNetworkDrive sDrive, bForce
        if not errnum = 22 then RemoveShare(sShareName)
      else
        wsh.echo "Failed"
      end if
    end with
    function MakeShare(sSharePath, sShareName)
    Const FILE_SHARE = 0
    Const MAX_CONNECT = 1
      with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
        with .Get("Win32_Share")
          MakeShare = .Create(sSharePath, sShareName, FILE_SHARE, MAX_CONNECT, sShareName)
        end with
      end with
    end function
    sub RemoveShare(sShareName)
    Dim cShares, oShare
      with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
        Set cShares = .ExecQuery _
          ("Select * from Win32_Share Where Name = '" & sShareName & "'")
        For Each oShare in cShares
          oShare.Delete
        Next
      end with
    end sub
    The SHARE that must be created for this to work is marked as having only one connect (the calling procedure).  The mapping and share is automatically removed when the console window is closed.  In the case cited in this posting, this approach could be applied using the subroutines provided so that the user's script creates the share/mapping, performs its file operations and then removes the mapping/share.  Ultimately, it might be more useful to change the folder structure, as suggested in the KB article, since working with the created folders and files will still be problematic - unless the drive mapping is in place.Tom Lavedas

  • How to list video files from the mobile phone?

    i need to list all video files from the mobile hone. can any one help me?

    Filter for Metadata > File Type > Video and then select them and press delete.  Then pick from catalog or disk.

  • How to copy DB files from UNIX filesystem to ASM in RMAN?

    Hi,
    I have a cold backup copied from a RAC ASM by using RMAN to UNIX filesystem. I made it like this:
    RMAN> run
    copy datafile 1 to '/backup/PDAMLPF2/offline/system.306.715096785';
    copy datafile 2 to '/backup/PDAMLPF2/offline/undotbs1.260.715096755';
    Now, I need to restore (or copy) this cold backup into another RAC ASM system to create a DB. How can I do the copy back?
    Thanks for advise!

    If you are using 11.1 or above you can use asmcmd cp command otherwise use dbms_file_transfer package. But keep in mind that since you are not using RMAN in any of those stages you will need to modify controlfile anyhow.
    Regards,
    Husnu Sensoy

  • How to list hidden files in a directory with "ls" bash command?

    I'm in the top visible directory of an iPod "IPOD (ADMIN" and I want to see the iTunes folder. How can I see the hidden folders? Alternatively is there a flag I can swtich to make them visible just inside the terminal application. I found a terminal command to do it in the Finder after you do a forced reboot.

    FWIW. if these are not dot files or folders and they are hidden from finder view, you can do one of the following to make them finder visible:
    chflags nohidden file-or-folder
    Or if you have the developer tools installed:
    /Developer/Tools/SetFile -a v file-or-folder
    Use this technique instead of the finder option to make all hiden files visible.

  • How to list all files of an ibook in the OPF manifest?

    I have this message error when i DELIVERED my iBooks with I Tunes Producer.
    ERROR ITMS-9000: "A5809-7_Math_Venture_3rd_Operations.ibooks: The book asset contains file(s) not listed in the OPF manifest: A5809-7_Math_Venture_3rd_Operations.ibooks:/OPS/assets/widgets/Activite? 1 english-1.kpf/images-1/s1.a.jpeg.  All files must be listed in the OPF manifest, or there is no way to confirm that they are intended for distribution. For more information refer to http://idpf.org/epub" at Book (MZItmspBookPackage)
    Like it is written, All files must be listed in the OPF manifest, or there is no way to confirm that they are intended for distribution.
    What that means?
    Need help please, for the last step before publishing my first book on iBookStore :-(
    Tx

    Hi, I've got the same issue here, there was something to do to get it fixed?
    I've read that my file (i suppouse the .ibooks file) should be named as the cover file (i suppouse the .jpg that shows the cover)
    Well, i renamed almost all files: the .iba file, the .ibooks and the .jpg cover file with the same name: Jalisco Auge de México (right, with accents)
    Then, in the list of issues i got this issues above the ones as listed by you:
    1: Apple's web service operation was not successful
    2: Unable to authenticate the package: (package number.itmsp)

  • How to transform pc files to hfs filesystem?

    Hi,
    I have files created on Windows OS platform.  Attempted to
    chown root:wheel myFileDirectory
    though it did not produce error, it does not change owner and group.  John D. kindly advised me that it's because of different file system, Mac uses HFS (I didn't know since I'm new to Mac).  So, now the question is how I transform files created in Windows environment into HFS?
    Thanks.

    Under Devices,
    I have Macintosh HD and iDisk.  So, I would guess the HD is the boot volume.   I think I've dragged some files from flash dirve (created in Windows OS env) to certain Folder on this HD, and this Folder was a folder created by the previous version of my software and it was / is working fine (local web app).
    Hmm, what could result the above problem?  Still file system issue?  What do I do now?
    Many thanks.

  • How to list sorted files in a folder?

    I am in need of creating a java program which should perform the following.
    1. Read ALL the files located under c:\main dir
    2. Append the read files into a Email.log file in the order in which the files are created.
    For example: main directory has three files. A.txt(created on Aug1st2009,10:00AM), B.txt(created on Aug1st2009,10:01AM),C.txt(created on Aug1st2009,10:02AM)
    Email.log file should contain the contents of A.txt then B.txt then C.txt. The contents of old file should appear in the top and the content of latest file(C.txt) shouled appeared in the bottom of Email.log file.
    Hope you understand my requirements. could you help me out in starting with sample code?

    Pannar wrote:
    starting with sample code?No!
    It is your job to write the code not ours. When you have done that and have encountered a problem then come back and ask a specific question including all the relevant information.
    As far as I know there isn't anyway to determine the creation date of a File in core Java. There maybe a third party lib that can do it.

Maybe you are looking for

  • Interlacing

    Hi, I need to deinterlace some video since there are some bad artifacts- the usual jagged edges, bad motion etc. I usually solve this with the interlacing filter in FCP through a little trial and error, but this is not doing the job for my current wo

  • Looping video or audio slide

    I have been trying to "loop" a video file to play over and over and am having no luck. I thought I could follow instructions, but eveidently I'm retarded or the instructions are not correct. I also would like to loop an entire presentation without fi

  • Elements 5.0: Can tags be added to multiple photos simultaneously?

    Windows XP, 2.00 GHz CPU, .5 gig RAM, etc.<br /><br />Just wondering if a tag can be added to multiple files within the Organizer, like some kind of <shift> + key option?  Or even the entire folder at once?  Thanks,<br /><br />-Dave

  • I can not open an Excel Spreadsheet

    I purchased my MacPro last November. I loaded NUMBERS on my macnine as well as PAGES, and KEYNOTE. I was determined to learn these programs and not rely on using MS OFFICE on my Mac. The rest of my office is still using PC/s and therefore when I am s

  • OS X says boot disc full when it isn't - by a long way

    I ran SuperDuper last night and the backup failed with an unknown error. After, Spotlight didn't find files. I rebooted and at the login screen was given the error message 'backup disc full, delete some files' - problem is, OS X won't boot beyond the