Listing root directory.

Hey.
I've gotta write a Java program that will display the contents of a specified root directory and all of its subdirectories, and to be honest i dont know where to start. I would ask my tutor, but we're currently on a break and he is out of the country. Could someone give me an idea of where to start?
Much Appreciated.
Tim.

Try this:import java.io.*;
import java.util.*;
public class Test
  public static void main(String[] argv)
    try
      Vector v = getAllFiles("c:\\winnt");
      for(int i=0; i<v.size(); i++) System.out.println(v.elementAt(i).toString());
      System.exit(0);
    catch(Throwable t){ t.printStackTrace(); }
  private static Vector getAllFiles(String root)
    try
      Vector v = new Vector(); File f = new File(root);
      if(!f.isDirectory()) v.addElement(new File(f.getAbsolutePath())); /* a simple file */
      else /* a folder! */
        String[] subfiles = f.list();
        for(int i=0; i<subfiles.length; i++)
          File temp = new File(f.getAbsolutePath() + System.getProperty("file.separator") + subfiles);
Vector newv = getAllFiles(temp.getAbsolutePath()); /* recursive call */
for(int j=0; j<newv.size(); j++) v.addElement(newv.elementAt(j)); /* add all leafs */
return v;
catch(Throwable t) { t.printStackTrace(); return new Vector(); }

Similar Messages

  • How can i get also the files in the root directory and how can i for testing add items of IEnumerable FTPListDetail to List string ?

    What i get is only the directories and files that in other nodes. But i have also files on the root directory and i never
    get them. This is a screenshot of my program after i got the content of my ftp. I'm using treeView to display my ftp content:
    You can see two directories from the root but no files on the root it self. And in my ftp server host i have files in the root direcory.
    This is the method i'm using to get the directory listing:
    public IEnumerable<FTPListDetail> GetDirectoryListing(string rootUri)
    var CurrentRemoteDirectory = rootUri;
    var result = new StringBuilder();
    var request = GetWebRequest(WebRequestMethods.Ftp.ListDirectoryDetails, CurrentRemoteDirectory);
    using (var response = request.GetResponse())
    using (var reader = new StreamReader(response.GetResponseStream()))
    string line = reader.ReadLine();
    while (line != null)
    result.Append(line);
    result.Append("\n");
    line = reader.ReadLine();
    if (string.IsNullOrEmpty(result.ToString()))
    return new List<FTPListDetail>();
    result.Remove(result.ToString().LastIndexOf("\n"), 1);
    var results = result.ToString().Split('\n');
    string regex =
    @"^" + //# Start of line
    @"(?<dir>[\-ld])" + //# File size
    @"(?<permission>[\-rwx]{9})" + //# Whitespace \n
    @"\s+" + //# Whitespace \n
    @"(?<filecode>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<owner>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<group>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<size>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<month>\w{3})" + //# Month (3 letters) \n
    @"\s+" + //# Whitespace \n
    @"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
    @"\s+" + //# Whitespace \n
    @"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
    @"\s+" + //# Whitespace \n
    @"(?<filename>(.*))" + //# Filename \n
    @"$"; //# End of line
    var myresult = new List<FTPListDetail>();
    foreach (var parsed in results)
    var split = new Regex(regex)
    .Match(parsed);
    var dir = split.Groups["dir"].ToString();
    var permission = split.Groups["permission"].ToString();
    var filecode = split.Groups["filecode"].ToString();
    var owner = split.Groups["owner"].ToString();
    var group = split.Groups["group"].ToString();
    var filename = split.Groups["filename"].ToString();
    var size = split.Groups["size"].Length;
    myresult.Add(new FTPListDetail()
    Dir = dir,
    Filecode = filecode,
    Group = group,
    FullPath = CurrentRemoteDirectory + "/" + filename,
    Name = filename,
    Owner = owner,
    Permission = permission,
    return myresult;
    And then this method to loop over and listing :
    private int total_dirs;
    private int searched_until_now_dirs;
    private int max_percentage;
    private TreeNode directories_real_time;
    private string SummaryText;
    private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
    var directoryNode = new TreeNode(name);
    var directoryListing = GetDirectoryListing(path);
    var directories = directoryListing.Where(d => d.IsDirectory);
    var files = directoryListing.Where(d => !d.IsDirectory);
    total_dirs += directories.Count<FTPListDetail>();
    searched_until_now_dirs++;
    int percentage = 0;
    foreach (var dir in directories)
    directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
    if (recursive_levl == 1)
    TreeNode temp_tn = (TreeNode)directoryNode.Clone();
    this.BeginInvoke(new MethodInvoker( delegate
    UpdateList(temp_tn);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    foreach (var file in files)
    TreeNode file_tree_node = new TreeNode(file.Name);
    file_tree_node.Tag = "file" ;
    directoryNode.Nodes.Add(file_tree_node);
    numberOfFiles.Add(file.FullPath);
    return directoryNode;
    Then updating the treeView:
    DateTime last_update;
    private void UpdateList(TreeNode tn_rt)
    TimeSpan ts = DateTime.Now - last_update;
    if (ts.TotalMilliseconds > 200)
    last_update = DateTime.Now;
    treeViewMS1.BeginUpdate();
    treeViewMS1.Nodes.Clear();
    treeViewMS1.Nodes.Add(tn_rt);
    ExpandToLevel(treeViewMS1.Nodes, 1);
    treeViewMS1.EndUpdate();
    And inside a backgroundworker do work how i'm using it:
    var root = Convert.ToString(e.Argument);
    var dirNode = CreateDirectoryNode(root, "root", 1);
    e.Result = dirNode;
    And last the FTPListDetail class:
    public class FTPListDetail
    public bool IsDirectory
    get
    return !string.IsNullOrWhiteSpace(Dir) && Dir.ToLower().Equals("d");
    internal string Dir { get; set; }
    public string Permission { get; set; }
    public string Filecode { get; set; }
    public string Owner { get; set; }
    public string Group { get; set; }
    public string Name { get; set; }
    public string FullPath { get; set; }
    Now the main problem is that when i list the files and directories and display them in the treeView it dosen't get/display
    the files in the root directory. Only in the sub nodes.
    I will see the files inside hello and stats but i need also to see the files in the root directory.
    1. How can i get and list/display the files of the root directory ?
    2. For the test i tried to add to a List<string> the items in var files to see if i get the root files at all.
       This is what i tried in the CreateDirectoryNode before it i added:
    private List<string> testfiles = new List<string>();
    Then after var files i did:
    testfiles.Add(files.ToList()
    But this is wrong. I just wanted to see in testfiles what items i'm getting in var files in the end of the process.
    Both var files and directoryListing are IEnumerable<FTPListDetail> type.
    The most important is to make the number 1 i mentioned and then to do number 2.

    Risa no.
    What i mean is this. This is a screenshot of my ftp server at my host(ipage.com).
    Now this is a screenshot of my program and you can see that in my program i have only the directories hello stats test but i don't have the files in the root: htaccess.config swp txt 1.txt 2.png....all this files i don't have it on my treeView.
    What i want it to be is that on my program on the treeView i will also display the files like in my ftp server.
    I see in my program only the directories and the files in the directories but i don't see the files on the root directory/node.
    I need it to be like in my ftp server i need to see in my program the htaccess 1.txt 2.png and so on.
    So what i wrote in my main question is that in the var files i see this files of the root directory i just don't know to add and display them in my treeView(my treeView is treeViewMS1).
    I know i checked in my program in the method CreateDirectoryNode i see in the first iteration of the recursive that var files contain this root files i just dont know how to add and display them in my treeView.
    On the next iterations when it does the recursive it's adding the directories hello stats test and the files in this directories but i need it to first add the root files.

  • Getting list of files in root directory

    I have seen many forum talking somewhat on this subject but I always see them using c: (for windows) as the example directory. I need to write this so that I can go to a Unix directory.
    Example:
    I want to go to the root directory from where I am....I would use runtime.exec(), right? But does the runtime actually go to that directory or just run the exec?
    If there was a "name" such as c: in unix like windows it would be easier. But, I can not just say the name of the directory is / to get in there and check out the files. So, really what I want to do is if someone is not in the particular directory I want to be able to go to the root directory and check files there, then go to another directory and check the files there, etc.
    I have a hard time explaining things so hopefully someone will get me.
    Thanks.

    But the trouble I am running in to is that I want the
    root directory in Unix, which would be /. I can not
    not just put that as the directory, can i?You can if you spell it out:
    /export/home/thefunnyrootename
    ... or use:
    String sysprop = System.getProperty("whatever property");
    File f = new File(sysprop);... To determine which you want, SDK v1.3.1 docs for System.getProperty():
    getProperties
    public static Properties getProperties()
        Determines the current system properties.
        First, if there is a security manager, its checkPropertiesAccess
    method is called with no arguments. This may result in a security
    exception.
        The current set of system properties for use by the
    getProperty(String) method is returned as a Properties object.
    If there is no current set of system properties, a set of system
    properties is first created and initialized. This set of system
    properties always includes values for the following keys:
        Key Description of Associated Value
        java.version Java Runtime Environment version
        java.vendor Java Runtime Environment vendor
        java.vendor.url Java vendor URL
        java.home Java installation directory
        java.vm.specification.version Java Virtual Machine specification version
        java.vm.specification.vendor Java Virtual Machine specification vendor
        java.vm.specification.name Java Virtual Machine specification name
        java.vm.version Java Virtual Machine implementation version
        java.vm.vendor Java Virtual Machine implementation vendor
        java.vm.name Java Virtual Machine implementation name
        java.specification.version Java Runtime Environment specification version
        java.specification.vendor Java Runtime Environment specification vendor
        java.specification.name Java Runtime Environment specification name
        java.class.version Java class format version number
        java.class.path Java class path
        java.ext.dirs Path of extension directory or directories
        os.name Operating system name
        os.arch Operating system architecture
        os.version Operating system version
        file.separator File separator ("/" on UNIX)
        path.separator Path separator (":" on UNIX)
        line.separator Line separator ("\n" on UNIX)
        user.name User's account name
        user.home User's home directory
        user.dir User's current working directory
    Note that even if the security manager does not permit the getProperties
    operation, it may choose to permit the getProperty(String) operation.
    Returns:
    the system propertiesThrows:
    SecurityException - if a security manager exists and its
    checkPropertiesAccess method doesn't allow access to the system
    properties.See Also:
    setProperties(java.util.Properties), SecurityException,
    SecurityManager.checkPropertiesAccess(), Properties~Bill

  • Too many files in root directory. How to split them up?

    Hi,
    I made my site http://isuckatgolf.net in Dreamwever cs3. Having no idea what I was doing when I started 5 years ago all images and pages have been uploaded directly to the root folder/directory. My host GoDaddy.com just sent me a notice that I'm only allowed 1024 folders/files in one directory. I have almost 7000 in the main site and 1500 in the database for the sub-domain/forum (SMF forum). According to Godaddy.com this is a rule of theirs, but it isn't posted anywhere that they could point me to. Only that I have a max. of 500,000 files total in my unlimited shared hosting account.
    I'm looking for a new host that can handle the way it is set up today. My question is, IF I have to divide these files up into subfolders or directories (whatever they're technically called), is it possible and is there an "easy" way to do this in Dreamweaver. Obviously manually moving 7000 files will take some time. But can it be done, and do you think it will be necessary no matter who hosts the site?
    Lastly, if I do find a host that is ok the way it is, going forward should I direct DW to put future images into an images folder of some kind. I never created one. Right now all the jpg, gif and html files are just listed. (I didn't know how to do it the right way when I started!)
    Any help would be apprecaited.
    Thanks!
    KEn

    It does not make any difference where your files are stored as long as the path to the file is correct. Nancy's idea is correct, but you can have sub-folders to the sub-folders. For example, I will have an images folder and within the images folder I will have folders that refer to pages within my site. My images folder may look like
    +images
         +index
              +thumbs
              +slides
         +gallery
              +holidays2012
                   +thumbs
                   +images
              +holidays2013
                   +thumbs
                   +images
              +golf
                   +images
    etc, etc.
    That way it is easy to discover if there are any redundant images.
    The same goes for the pages. You may have a products page with a couple of sub-pages. The directory would the be
    index.html
    aboutus.html
    products.html
    contactus.html
    +products
         fencing_material.html
         sport_clothing.html
         solar_panels.html
    etc, etc
    As said, it really does not matter where the files are, with the exception of the index page which must always be in the root directory.
    Good luck 

  • Perl modules are being installed to the wrong root directory

    This is kind of a package, kind of an AUR question. I don't think it is the usual "upgrade to perl-5.20" issue; I've done lots of searching with no obvious mention of my issue.
    I have downloaded the PKGBUILDs for perl-tk (in extra) and perl-pdl (in AUR). When I run makepkg on them, the resultant package has the wrong root directory. For example, perl-pdl tries to install into
    /home/<username>/perl5/bin/
    rather than
    /usr/bin
    and the libraries want to go into
    /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL
    rather than something like
    /usr/lib/perl5/vendor_perl/PDL
    I don't think I'm doing anything unusual with the build. For perl-pdl, I download the tarball from the AUR and untar it in ~/tmp. Cd to ~/tmp/perl-pdl and then run makepkg. The start of the build process says:
    ==> Making package: perl-pdl 2.007-1 (Wed Jun 18 16:12:19 PDT 2014)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    -> Found PDL-2.007.tar.gz
    -> Found perldl.conf
    ==> Validating source files with md5sums...
    PDL-2.007.tar.gz ... Passed
    perldl.conf ... Passed
    ==> Extracting sources...
    -> Extracting PDL-2.007.tar.gz with bsdtar
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    INFORMATION: using file /home/<username>/tmp/perl-pdl/src/perldl.conf to set configuration defaults
    Makefile.PL: Found required OpenGL version, setting USE_POGL => 1
    Types.pm.PL: using typedef long PDL_Indx
    Extracting Types.pm
    making PDL_B...
    making PDL_S...
    making PDL_US...
    making PDL_L...
    making PDL_IND...
    making PDL_LL...
    making PDL_F...
    making PDL_D...
    Warning: prerequisite Astro::FITS::Header 0 not found.
    Warning: prerequisite Convert::UU 0 not found.
    Warning: prerequisite File::Map 0.57 not found.
    Warning: prerequisite Module::Compile 0.23 not found.
    Generating a Unix-style Makefile
    Writing Makefile for PDL::pod
    Generating a Unix-style Makefile
    Writing Makefile for Inline
    Writing MYMETA.yml and MYMETA.json
    Generating a Unix-style Makefile
    Writing Makefile for PDL::PP
    Generating a Unix-style Makefile
    Writing Makefile for PDL::NiceSlice
    Writing MYMETA.yml and MYMETA.json
    Basic/Core/Makefile.PL: got root build dir /home/<username>/tmp/perl-pdl/src/PDL-2.007
    Basic/Core/Makefile.PL: adding /home/<usenname>/tmp/perl-pdl/src/PDL-2.007/inc
    Trying to figure out POSIX threads support ...
    Saw pthread.h. Fine.
    Fine, your perl was linked against pthread library.
    ==> Will build PDL with POSIX thread support. Gifts to TJL :-)
    and wraps up with
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/man/man3/PDL::Perldl2::NiceSlice.3pm
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/man/man3/PDL::Perldl2::PDLCommands.3pm
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/man/man3/PDL::Perldl2::PrintControl.3pm
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/man/man3/PDL::pdl2.3pm
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/bin/pdl2
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/bin/pptemplate
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/bin/perldl
    Installing /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/bin/pdldoc
    Appending installation info to /home/<username>/tmp/perl-pdl/pkg/perl-pdl/home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
    ==> Tidying install...
    -> Purging unwanted files...
    -> Removing libtool files...
    -> Removing static library files...
    -> Removing empty directories...
    -> Compressing man and info pages...
    -> Stripping unneeded symbols from binaries and libraries...
    ==> Creating package "perl-pdl"...
    -> Generating .PKGINFO file...
    -> Adding changelog file...
    -> Generating .MTREE file...
    -> Compressing package...
    ==> Leaving fakeroot environment.
    ==> Finished making: perl-pdl 2.007-1 (Wed Jun 18 16:21:25 PDT 2014)
    Excerpts of "pacman -Qlp perl-pdl-2.007-1-x86_64.pkg.tar.xz" look like
    perl-pdl /home/
    perl-pdl /home/<username>/
    perl-pdl /home/<username>/perl5/
    perl-pdl /home/<username>/perl5/bin/
    perl-pdl /home/<username>/perl5/bin/pdl
    perl-pdl /home/<username>/perl5/bin/pdl2
    perl-pdl /home/<username>/perl5/bin/pdldoc
    perl-pdl /home/<username>/perl5/bin/perldl
    perl-pdl /home/<username>/perl5/bin/pptemplate
    perl-pdl /home/<username>/perl5/lib/
    perl-pdl /home/<username>/perl5/lib/perl5/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/Inline/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/Inline/MakePdlppInstallable.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/Inline/Pdlpp.pmperl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/AutoLoader.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Bad.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Basic.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/CallExt.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Char.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Complex.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Compression.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Config.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Constants.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Core.pm
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Core/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Core/Dev.pmperl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Core/pdl.h
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/PDL/Core/pdlcore.h
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Bad/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Bad/Bad.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/CallExt/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/CallExt/CallExt.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Complex/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Complex/Complex.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Compression/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Compression/Compression.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Core/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Core/Core.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/FFT/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/FFT/FFT.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Fit/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Fit/Gaussian/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/Fit/Gaussian/Gaussian.so
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/GIS/
    perl-pdl /home/<username>/perl5/lib/perl5/x86_64-linux-thread-multi/auto/PDL/GIS/Pr
    perl-pdl /home/<username>/perl5/man/
    perl-pdl /home/<username>/perl5/man/man1/
    perl-pdl /home/<username>/perl5/man/man1/PDL::API.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::BadValues.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Bugs.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Course.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Dataflow.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Delta.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::FAQ.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Indexing.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Internals.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::MATLAB.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Modules.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Objects.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::PP-Inline.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::PP.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::ParallelCPU.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Philosophy.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::QuickStart.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Scilab.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Threading.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Tips.1p
    perl-pdl /home/<username>/perl5/man/man1/PDL::Tutorials.1p
    perl-pdl /home/<username>/perl5/man/man1/pdl2.1p
    perl-pdl /home/<username>/perl5/man/man1/pdldoc.1p
    perl-pdl /home/<username>/perl5/man/man1/perldl.1p
    perl-pdl /home/<username>/perl5/man/man1/pptemplate.1p
    perl-pdl /home/<username>/perl5/man/man3/
    perl-pdl /home/<username>/perl5/man/man3/PDL.3pm
    perl-pdl /home/<username>/perl5/man/man3/PDL::AutoLoader.3pm
    perl-pdl /home/<username>/perl5/man/man3/PDL::BAD2_demo.3pm
    It seems like the $pkgdir variable is screwed up, but non-perl AUR packages have installed just fine. Any pointers? Thanks.

    As usual I am probably too late to help. If you have local::lib installed and activated, it will override your destination directory when building packages. This is accomplished by setting environment variables. Joel hinted at this and you've seemed to fix them. Here is a decent list of them, mostly written by me I believe: https://wiki.archlinux.org/index.php/Pe … _variables
    I've made tools that generate PKGBUILDs for perl modules and I always try to override these environment variables for just such an occasion. Entirely too much info on the subject is available at the wiki page above. Very few official PKGBUILDs will override these. Only the packages I used to maintain which retain my PKGBUILD will work for you. So... beware.

  • How do I set up a root directory for a web site

    So this is probably a naive newbie question.
    I have been creating websites driven by php/mysql on my mac for years using the previous the web preference pane to run Apache and since that went away using XAMPP to provide Apache/php/mysql functionality on localhost.
    I decided to download OSX server and try to use that.  Figured might as well go native MAC.
    I am baffled.
    The manual says to set up a web site in Server by working through the Websites Services interface. I did that and pointed the setup at the directory where I have all of my web site files.  I now have no idea how to access that page from my local machine.
    I have tried:
    http://localhost/myURL
    http://localhost/~username/Sites/[root file directory]  -- where the files are stored
    I also tried some typical localhost ip address
    None access my site.
    How do I access my site over my local netework?
    I feel like just dumping server.app and stting things up through the terminal.
    Thanks,
    --Kenoli

    How familiar are you with the bash command line and with Apache, and how much do you want to learn about Apache and related topics?  (If you're not already, then I'd encourage learning about this material, as this knowledge is very useful for maintaining and updating sites, and knowledge of correctly securing files and directories is critical to building and maintaining secure web sites — all of managing and running and updating a web server builds on these foundations.  There are various good books and web sites on Apache, and the Apache web site has various materials available, if you don't already have something.)
    The localhost host name and the 127.0.0.1 IPv4 address are both synonyms for the "me" host.  It's the name and the address that always gets you to the current host.
    With http://localhost/ or http://127.0.0.1 specification, what you enter at the URL address bar is relative to the root directory specified for the default web server, and will default to the index.html or index.php page or whatever the default web site is configured to use.  With OS X Server, this root directory is configured via Server.app.  To use Server.app, launch it, connect to the server, select Websites from the left navigation, and you (by default) will see a default site and a secure site.  Select the default site.  Select the edit button below the site to edit (and to view) the configuration. 
    With the details of the default site visible, you will see the path to the default web directory.  This path to the default web directory is where the files for the default web sever location reside. 
    The default path to the default web site is /Library/Server/Web/Data/Sites/Default
    If you place foo.html in that directory (or whatever the defailt web site is using), you can view it via your web browser and the URLs:
    http://127.0.0.1/foo.html
    http://localhost/foo.html
    To get to the default web site using the GUI, launch Finder and select Go To Folder, and enter that string into the box.  You will now get a GUI view of that folder.  (I'd strongly recommend using the command line here, and not the GUI.  To get to the directory from the command line and then list the files present, launch Terminal.app from Applications > Utilities folder and issue the following commands:
    cd /Library/Server/Web/Data/Sites/Default
    ls
    If you want to test something in the browser, you can use the file:///path-to-file-to-test mechanism.  Most web browsers will allow you to render local files directly using file and three slashes.
    You will need to ensure the executable files (scripts) are marked as executable to OS X, using a Terminal.app command such as the following:
    chmod o+x path-to-file
    Enabling ~/user per-user sites involves directly editing the configuration file, as Apple has disabled that by default. 
    There's an Apache tutorial with an overview of what's involved with enabling per-user directories here, and there's what's been listed in my earlier replies and links.  With OS X Server Mavericks, the default configuration file for Apache is located in the Library folder, and can be viewed with the following Terminal.app command:
    cat /library/server/web/config/apache2/httpd_server_app.conf
    This file is the OS X Server equivalent of the oft-cited httpd.conf file you'll see listed in various documentation.
    If you want to enable the per-user directories or tweak other Apache settings, then shut down Apache from Server.app or from the command line, and then edit the configuration file with nano or some other command-line editor using a command similar to this:
    sudo nano /library/server/web/config/apache2/httpd_server_app.conf
    you'll end up finding and uncommenting (removing the #) from the following two lines:
    #LoadModule apple_userdir_module ${SERVER_INSTALL_PATH_PREFIX}/usr/libexec/apache2/mod_userdir_apple.so
    #Include /private/etc/apache2/extra/httpd-userdir.conf
    If you have specific questions about this, then I and others here can answer those.  If you don't understand something, then asking a question about that can help you learn, and can help me understand what it is that I'm posting in my replies here that's confusing you.  There are also various resources available for learning Apache, and I'd encourage spending a little time with those if you've not already done so or feeling at all unsure about how that tool works; I end up re-re-reviewing the Apache docs fairly regularly.

  • Full root directory

    I`ve experienced full root directory
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda4 32G 32G 0 100% /
    none 1013M 0 1013M 0% /dev/shm
    /dev/sda3 38G 31G 4.7G 87% /home
    root / # du -m --max-depth=1
    1 ./lost+found
    201 ./var
    1399 ./opt
    1 ./media
    15 ./srv
    5435 ./usr
    1 ./dev
    14 ./sbin
    5 ./bin
    31306 ./home
    0 ./sys
    73 ./lib
    8 ./boot
    8 ./root
    1 ./tmp
    0 ./proc
    33 ./etc
    I`m confused /home dir is on the other partition, so why / became full (~7GB of taken space is not 32GB)?
    I think that my last screw-up with chmod on / caused this.
    Last edited by Kardell (2008-08-10 21:54:52)

    You`re right!
    But actually this guilty overflooding directory was some /mnt subdir not listed above, because I interrupted du listing.
    Thanks mate!

  • Cron Job in Root Directory

    I am running OS 10.4.6 on a Mac G4 450MHz machine. Recently when I opened Activity Monitor I noticed a cron job showed up in the root directory that hadn't been there before. I know I can select the cron job and then click on the Inspect icon but the dialogue boxes that show up do not tell me anything about the cron job except statistics having to do with CPU or memory usage. How do I find out what the cron job is and what it does? Is having a cron job in the root directory normal for 10.4.6? If it's not supposed to be there, how do I get rid of it?
    Thanks for your help.
    G4   Mac OS X (10.4.6)   450MHz with 768MB of RAM

    David,
    I think you are seeing the cron daemon. Not a "cron job". The cron daemon is started during the boot process. Cron then reads /etc/crontab. Crontab list "jobs" to be run and at what time. As of Tiger cron has been demoted and launchd handles running "jobs". Cron is still started at boot time but does nothing. It runs for backwards compatibility. There's nothing to get rid of- just leave it alone.

  • Strange Folders Appear in Root Directory

    After a clean install of 10.5 on a MacBook and MacBook Pro, and then applying all of the Software Update recommended updates, I'm noticing some strange folders appear in my root directory.
    On the MacBook Pro, I now have a Developer folder with Applet Launcher and Jar Bundler inside. Obviously, these are Java tools, but I'm not sure what installed them. I do not have any developer tools installed on this machine.
    On the MacBook, I'm seeing links to the Unix directories bin, sbin, etc, and so forth in the root folder. Again, not sure how they got there, or what app may have created them.
    Both the MacBook Pro and MacBook have essentially the same applications and updates applied, so I'm at a loss as to why there's the inconsistency.
    Thanks,
    JKG

    Something went awry during the installation that has made some invisible items visible. The following outlines how to fix the problem. It's a bit complicated:
    It's a bit of a confusion in Leopard. Start by downloading Pacifist at VersionTracker or MacUpdate. Open Pacifist.
    Insert your Leopard DVD into the optical drive. Select Go to Folder from the Finder's Go menu and enter:
    /Volumes/Mac OS X Install DVD/System/Installation/Packages/
    Click on the Go button. Locate the OSInstall.pkg file and drag it to the Pacifist window. Click on the Resources tab in the Pacifist list window. Open the Scripts folder and locate the hidden_MacOS9 file and click on the Extract to icon in the Pacifist toolbar. I would extract it the the /usr/sbin/ directory. Now Open the Tools folder and locate the SetHidden command. Select it and click on the Extract to icon in the Pacifist toolbar. Extract it also to the /usr/sbin/ directory.
    Now you can quit Pacifist. Open the Terminal app in your Utilities folder. At the prompt enter or paste the following commands pressing RETURN after each:
    cd /usr/sbin
    sudo ./SetHidden / hidden_MacOS9
    Enter your password which will not be echoed.

  • Downloaded a music file which originally played through my playlist, but now says it cannot find the original file associated with it.  Takes me to the root directory, but this does not help.

    Downloaded a music file which originally played through my playlist in iTunes but now it comes up with a message that the original file cannot be located although the file appears in the play list.  It asks if it should search for the relevant file which takes me to the root directory and is no help.

    Hello gordon175
    You would need to locate the song on your computer to link them back up so it will play. If you cannot find it and it was purchased from the iTunes Store, you can delete the track and download it again for free.
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/ts1408
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht2519
    Regards,
    -Norm G.

  • LV project files view root directory

    I want to understand the nature of the LabVIEW project files view root directory. I suppose the files there are installed by dotnet framework and LabVIEW and will be installed to the target machine by dotnet framework and LabVIEW installer, is it correct? I searched that mscorlib is a Microsoft DLL but I don't know why it has a LabVIEW icon. 

    mscorlib is the the fundamental assembly for the .NET Framework; critical for .NET integration into LabVIEW. the files shown in your screenshot shouldn't be installed in the project directory or the root of your drive; they should exist in the GAC. Windows (and thus LabVIEW) considers this a special folder. LabVIEW doesn't show this folder in your files list for this reason; they appear to be in "no folder".
    Although why mscorlib has a LabVIEW icon - that's a good question. Given the amount of .NET integration in LabVIEW, mscorlib would be the key dependency for all of it regardless of the other actual .NET assemblies used. I guess they just gave it a LabVIEW icon because it would be so commonly in your dependencies list.

  • WDTV Live has lost all content, Root Directory no longer showing on PC - HELP

    Hi All, I disconnected my WDTV Live last night from my TV and connected directly to my router with a network cable. When I click on the WDTV under networks in my computer there is nothing there at all! no root folder, none of my files etc. I have tried dropping a new folder in there but it wont let me and the option to right click add new folder is not availble. When plugged back to the tv there is no file contents either, everything is gone. Please help, I'm runnning Windows 7, the WD still turns on, I have no files no root directory, NOTHING!

    A co-worker of mine is having a very similar problem with her WD Media Hub.  I was the one who helped her get it setup when she first purchased the media hub (a few years back) and so she came to me when she recently went to use it and it acted like as if there was no content on the thing at all.   She brought me the device to work and i was able to get it connected to the network and access it via IE (using the web page at http://10.70.0.86:80/) but any attempt to connect directly via windows explorer fails.  The hubs name is the default WDTVLiveHub and when I type in \\WDTVLIveHub\ in Windows Explorer it can’t find the device nor can I map a network drive to it.  This is how we originally setup her media hub with content, using Windows Explore to copy a bunch of content.   When I was able to access the device via IE at 10.70.0.86:80 I went to the System and selected Storage and in the drop down for device the drop down is blank with nothing to select.  In the top right there as a red exclamation mark and when I selected it I got a warning saying the drive's was near capacity.  This tells me the files are there but for some reason they can’t be accessed. I did a hard reset via the button on the bottom of the device but that did not fix the problem with accessing it via Windows Explorer.  I told her to take it home and see if it will work for her when she hooks it up to her tv,.It’s definitely not a firmware update issue because she's not had it connected to the internet so any firmware update would have had to been done manually. Any feedback or troubleshooting suggestions is most welcome.  

  • FinRep 9.3.1: All users getting error opening reports from root directory

    We are having an irritating, although not missiion critical error
    When a user (any user) attempts to open a report from the explorer view in Financial Reporting 9.3.1, we receive an "_Error 1000165"._ No explanation is provided. No folders are openable within the explorer view except "Personal Page."
    It is possible to open reports by opening a report that got accidentally stored in the root directory and then opening another report from the menu system in the usual way. So it is not a user permissions/provisioning issue.
    Is there a fix to this? I am afraid someone will clean out the root directory and then we won't be able to access our reports.
    Update: I can use the pattern "VariancePercent([B(A)],[A(A)])" to cut this to 27 Columns by varying the direct reference to the column. But is there an easier way to do this?
    Edited by: user10868938 on Feb 24, 2009 3:43 PM

    We have been able to complete the update of our users SSID's in our Planning SQL tables through the utility. We had to create the users in Essbase first though.
    However, if I try to log into Planning (through Workspace) I still cannot see the Planning applicaitons I should have access too. In Shared Services if I pull up my network ID and View Report, I do not get any Planning groups to show up that I belong too. I can open the group in HSS and see my ID is in it but when I do the View Report on my ID nothing comes up.
    Additionally, if I add a user from scratch to the existing Planning groups that we've migrated and do the View Report they will show up for that user and the security passes through to Planning/Essbase so that I could log on fine. So, the problem is not with adding new users but the existing one's that were migrated. HSS shows the users in the groups but if you view a Report for those users it doesn't look like you belong to any groups.
    We are going to apply a patch to Shared Services to see if it helps. It's suppose to deal with Groups that have users from multple domains but one set of those users cannot log into the application they should have access too. We applied this in our stand-alone S9 Essbase environment a couple of months ago to deal with a break between our existing users and groups from HSS to Essbase. Maybe this will be the final piece.

  • Error when running captive runtime .exe from root directory of drive.

    Platform: Windows
    Specifics: Captive runtime desktop app using an ANE.
    Problem:  I am distributing the app on a flash drive. Ideally,the .exe will be on the root of the drive, so the user will not need to enter a subdirectory. I'm mostly concerned about users moving the software and getting frustrated by this error.
    The error is "Adobe Air: The installation of this application is damaged. Try re-installing or contacting the publisher for assistance."
    Here's an example. Importantly, this error only occurs when an ANE is included. I tried a few different ANE files created by others, and simply adding them to the project produces the error. I don't even need to use the ANE anywhere in my code.
    https://www.dropbox.com/s/epfj0138pfbmu49/soExample.7z
    This is a simple application with a few blank buttons. Try extracting in a subdirectory somewhere, and then moving to the root of a flash drive or any other drive. However, I don't recommend running code from strangers on the top directory of your C:\ drive.
    Additionally, I installed Apache Flex 4.12 but the error persists. The text simply changed to "Initial content could not be loaded for this application. Try re-installing or contacting the publisher for assistance."
    https://www.dropbox.com/s/epfj0138pfbmu49/soExample.7z

    I did some more testing. Same issue occurs if I create a captive runtime app from Flash Pro. It also happens when I use the Adobe Air installer, but install to the root directory.
    Can anyone think of a workaround?

  • Import Error: The root directory does not exist

    Hi,
    I have some isuuses with importing the extended page. When I try to Import it throws an error.
    Root Directory does not exist.
    I am using the following command.
    import c:\jdev\jdevhome\jdev\myprojects\oracle\apps\asn\opportunity\webui\EMCOpptyDetPG.xml -includeSubpackages -validate -rootdir c:\prabhat\Jdev\jdevhome\jdev\myprojects -mmddir C:\prabhat\Jdev\jdevhome\jdev\myhtml\OA_HTML\jrad -userId 1 -username apps -password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =xxxx)(port =xxx)))(connect_data = (sid = xxxx)))" -jdk13
    Importing /oracle/apps/asn/opportunity/webui/EMCOpptyDetPG
    Validation warnings in document "/oracle/apps/asn/opportunity/webui/EMCOpptyDetP
    G":
    Importing /oracle/apps/asn/opportunity/webui/EMCOpptyDetPG
    Validation warnings in document "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG":
    Invalid value "/oracle/apps/pv/opportunity/webui/PvOpptyPartnerRN" for property
    "Extends" on component "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubt
    abPrmRN". Component "/oracle/apps/pv/opportunity/webui/PvOpptyPartnerRN" cannot
    be referenced from "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubtabPr
    mRN" because it violates scope restrictions.
    Invalid value "/oracle/apps/jtf/cac/task/webui/CacTaskSummRN" for property "Exte
    nds" on component "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubtabTas
    kRN". Component "/oracle/apps/jtf/cac/task/webui/CacTaskSummRN" cannot be refere
    nced from "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubtabTaskRN" bec
    ause it violates scope restrictions.
    The component "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubtabTaskRN"
    cannot contain "/oracle/apps/jtf/cac/task/webui/CacTaskSummRN.CacSmrTable" of t
    able style because it is inside "tableLayout".
    The component "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNSubtabTaskRN"
    cannot contain "/oracle/apps/jtf/cac/task/webui/CacTaskSummRN.CacSmrTaskButtonR
    N" of stackLayout style because it is inside "tableLayout".
    Invalid value "/oracle/apps/pv/opportunity/webui/PvAbandonOpptyRN" for property
    "Extends" on component "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNPrmS
    tack". Component "/oracle/apps/pv/opportunity/webui/PvAbandonOpptyRN" cannot be
    referenced from "/oracle/apps/asn/opportunity/webui/EMCOpptyDetPG.ASNPrmStack" b
    ecause it violates scope restrictions.
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Error: The root directory does not exist
    Import completed.
    But After this when I try to see from the server there is no file with name EMCOpptyDetPG.xml exist. So I think this file is not imported.
    Could suggest how to solve this problem.
    Thanks
    Prabhat

    Hi Tapash
    while deploying a page to mds Repository i m getting the same error that root Directory does not exist but it also says that import completed successfully.
    when i see the same using jdr_utils.listDocuments('xxxx/oracle/apps/ak/server/webui/xxxPG')
    it says printing /xxxx/oracle/apps/ak/server/webui/xxxPG thus page is available in the mds repository and i m able to access the page at run time
    my concern is why i m getting this error
    my import command looks like this
    java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xxxx/oracle/apps/ak/server/webui/xxxxPG.xml -jdk13 -mmddir $OA_HTML/jrad -username apps -password apps -rootdir $JAVA_TOP -validate -dbconnection " (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xyxyxyxyxy)(PORT = xyxyx)) (CONNECT_DATA = (SID =yyy)))"
    could u pls suggest some solution.

Maybe you are looking for