Getting a files inode under unix

i want to take a list of files and sort them according to their inodes.
how do i get file i-nodes under unix system?

Pure Java wont work.
You need an external command (-i flag for ls)
or a native method accessing:
STAT(2) System calls STAT(2)
NAME
stat, fstat, lstat - get file status
SYNOPSIS
#include <sys/stat.h>
#include <unistd.h>
int stat(const char file_name, struct stat buf);

Similar Messages

  • Getting no file found under the given path- VNX-Family Monitoring and Reporting

    Server- Windows-2012 R2
    Using v21 of setup-vnx-mr-v21-win64
    Using NAVCLI-Win-32-x86-en_US-7.33.6.0.96-1
    Installed VNX-Family Monitoring and Reporting w/o any issues. Set user permissions.getting 
    Attempting to add VNX5400
    I am using direct IP address: 10.X.X.X, Getting no file found under the given path error.
    Any suggestions?
    An using correct permissions
    Thanks
    This topic first appeared in the Spiceworks Community

    Server- Windows-2012 R2
    Using v21 of setup-vnx-mr-v21-win64
    Using NAVCLI-Win-32-x86-en_US-7.33.6.0.96-1
    Installed VNX-Family Monitoring and Reporting w/o any issues. Set user permissions.getting 
    Attempting to add VNX5400
    I am using direct IP address: 10.X.X.X, Getting no file found under the given path error.
    Any suggestions?
    An using correct permissions
    Thanks
    This topic first appeared in the Spiceworks Community

  • File name under UNIX

    Hi,
    I have this problem: a part of my application is reading a file name. Sometimes the file name contains special characters: �, �.... Everything works fine when I'm testing on Windows. When I'm testing under UNIX I get '?' insteed of �. I can see that la file has a corect name on the HDD.
    Why my application displays different results on Windows and UNIX?
    Ex:
    File f = new File("bla/bla1/bla2");
    Filter filter = new Filter(".txt");
    String[] files = f.list(filter);
    The files array contains diferennts strings on Windos comparing to UNIX.

    Que? File names are allowed to contain certain characters in windows, and another set of characters in unix.
    /Kaj

  • Where is the DB_CONFIG file located under Unix environment?

    Hello,
    i'm new to Berkeley db, i have installed the version "db-4.8.30.NC.tar.gz" but now i would like to find the configuration
    information by using the configuration file.
    I've read in the documentations that this file is named DB_CONFIG and it exists in the
    database home directory.
    In my system, i have uzipped the tar file under /usr/db-4.8.30.NC but i still haven't found
    the DB_CONFIG file.
    Shall i expect that this file is going to be named in this way "DB_CONFIG", right?
    But still i'm searching it and i haven't found it.
    May you please help me?
    Thanks, in advance

    Hello,
    DB_CONFIG is a file you create in your database home directory. It is not supplied
    by BDB. The documentation on how to use DB_CONFIG is below:
    DB_CONFIG configuration file:
    http://docs.oracle.com/cd/E17076_02/html/programmer_reference/env_db_config.html
    The parameters are listed at:
    http://docs.oracle.com/cd/E17076_02/html/api_reference/C/configuration_reference.html
    Thank you,
    Sandra

  • How to invoke 'File Open' dialog box in Forms (under unix)

    Hi all,
    On the Unix platform (motif), how do I get the File Open Dialog
    Box by using Forms45.
    Thanks and regards,
    Srinivasa.
    null

    going from 6i to 10g is a migration. That's no easy step normally.
    client-server-functionality has gone. web-functionality is new.
    Install the new webutil-toolset from oracle and use the new file-open-dialog from the webutil.pll. That's the way you work in the new 10g-environment.
    Read in the forms-section of the OTN the migration-papers and the webutil-doc's

  • How to get file perperties in Unix server

    Dear All,
       I want to get the file properties which is created in the SAP server and can be displayed using AL11.
       My question is that: which BAPI can collect the infomation including generation time, size and so on.
       Many thanks.

    Hi,
    try that ext. perform :
       PERFORM P6_TO_DATE_TIME_TZ(RSTR0400) USING FILE-MTIME
                                                   FILE-MOD_TIME
                                                   FILE-MOD_DATE.
    mtime is unix time : seconds since 01.01.1970
    regards Andreas

  • How do I transfer PDF files from PC to IPAD using Itunes 12.1.2.  Previous versions let me drag file in Itunes to Ipad and files appeared under Ibook but can't get it to work in latest 12.1.2 version.

    How do I transfer PDF files from PC (Windows 7) to IPAD using Itunes 12.1.2.  I would like to do files manually rather then auto synch.  Previous versions let me drag file in Itunes to Ipad and files appeared under Ibook and then I could move them to an appropriate collection title.  The interface appears to have changed in the latest ITunes version and I am not sure what the proper procedure is.

    King_Penguin - Thanks it worked perfectly.  I had my pdf files copied into ITunes on my PC but when I clicked on a pdf file to copy it I thought the sidebar would appear with my IPAD name and then I would drag it over.  I didn't realize that I needed to click-and start dragging it towards the left-hand side for the sidebar to appear.  It worked like a charm - THANKYOU!!!

  • How to get information about file owner in UNIX

    Dear all
    I would like to write a file management program in Solaris 8 using Java.
    However, I don't know how to get the file owner and file permission information
    by any Java class. Please advise.
    Sincerely Yours
    Mr. Voravit H.

    I fear there will be no pure java solution, because file owner and file permissions are platform-dependent issues, especially about the gory details (groups, executable / sticky / setuid-bits, ACL etc.)
    AFAIK java supports only the notion of a file's being readable or writeable but nothing further.
    On the other hand, some (even popular and wide-sprread) platforms / file systems do not have the notion of the owner of a file.
    So you will need some platform-specific solution like running an external command or calling the C function "stat".

  • Photoshop .psd files converted to Unix Executable files

    I'm an illustrator and I store my art on CDs and DVDs. After a period of time my files are converted from Photoshop .psd files to Unix Executable files and I can't open them. What can I do to get my work back??? -and keep this from happening in the future. Why does it do this????
    Thanks for any help.

    The file sizes range from 22.2 MB to 67.9 MB.
    Size isn't the issue then. Linc was asking that question because we see that with other file types. Older fonts in particular, which have all of their data in the resource fork. If that gets stripped, you end up with a zero byte file.
    Does that mean I'll have to go through the Adobe authorization process for Photoshop again?
    If the version of Photoshop you're currently using is already activated, then no. Either way, it has nothing to do with .psd files showing as UNIX executables.
    In Windows, any file that doesn't have an association to a program is displayed as a white, dog-eared piece of paper with the Windows logo in the middle. That's Windows' way of saying, "I have no idea what this is." In OS X, (except for those files which actually are UNIX executables), displaying them as such is OS X's way of saying the same thing.
    I thought I was home free when the icon changed to a thumbnail picture of the illustration, but PS refuses to open it saying it is not a Photoshop file. ???
    Now that is weird. As of Snow Leopard, Apple put the old Type and Creator codes to rest. It will read them as a last resort to try and identify an older file, but none of Apple's applications add them to any file they save. For better compatibility with Windows, and OS X's own underlying UNIX core, file extensions have taken their place. So adding a .psd extension should have worked. Without playing with one of your files, I couldn't tell you why Photoshop declared it wasn't a valid .psd image.
    On a side note, Apple added Uniform Type Identifiers to OS X to keep things separate. A big problem in Windows is that multiple apps may use the same file extension. EPS is a big one in printing. So you have Photoshop, Illustrator, Freehand, Quark and others all using .eps for Encapsulated PostScript files. However, Windows can only associate one application to any given extension. So if Illustrator happens to be the one tagged to .eps files, it will try to open any file ending in .eps, no matter what program actually created it. OS X keeps them separate with Uniform Type Identifiers. So even though multiple files may have .eps file extensions, the extra metadata keeps track of what program it actually belongs to.
    This is what is part of the LaunchServices database, and was why it was my first suggestion. If that database is wonky, you'll see weird things like this. Have you tried clearing it yet?
    The files are fine when newly burned to CD. It is only months, or years, later that they become Unix Executable Files.  This has happened to just about all of my CD backups and it's frustrating to think that CD backup doesn't work across newer OSs and Photoshop upgrades. I suspect that may be the problem, but it just shouldn't happen.
    That shouldn't make a difference. I've got a bunch of very old files created in Photoshop back from OS 8 on CD. No file extensions, as nothing did at the time. Just Type and Creator codes. They all open fine in PS CS5.5 in Snow Leopard, though the native Photoshop files do need to have a .psd extension added.

  • How can I get hidden files from an external device with terminal?

    Here is my situation. I have an mp3 player that is a Sansa Clipp.  This version has third party firmware installed that not only hides the music files but will not let me copy them at all when I do a straight copy.  All I get are empty folders.  I want to install the actual firmware but first I need to back up the entire contents of the device because essentially I need to wipe the malicious firmware and everything else off the disc in order to to this. This device came from the Bureau of Prisons and is sold to prisoners.  It is basically locked to the hilt and the only way to unlock it officially is to send it to the third party that installed the firmware and pay them $25.  I know that I should be able to use terminal to get the files off of this but so far a  "cp" command has only given me the files that I get when I drag and drop.  The music files seem to be hidden in a partition that I can't access.  Let me know if anyone has any help they can give.  I just need to back up the full contents of the device.  I have instructions on how to wipe it and reinstall but backing up is crucial to this.  Thanks for any help and please ask questions if I haven't made my problem clear enough.

    I have know way of knowing whether or not this will copy the data. The device could have some hidden hand-shack.
    I assume the Sansa Clipp is a usb connected device.  The method works for a flash drive.  There is a different method for a harddrive..
    First, you need to find the name of the device.  Mount the device.
    /Applications/Utilities/Terminal.
    # run the df command.  type command then press return.
    mac $ df -h
    Filesystem                Size   Used  Avail Capacity  Mounted on
    /dev/disk1s16             272G   259G    12G    95%    /
    devfs                     113K   113K     0B   100%    /dev
    fdesc                     1.0K   1.0K     0B   100%    /dev
    <volfs>                   512K   512K     0B   100%    /.vol
    automount -nsl [217]        0B     0B     0B   100%    /Network
    automount -fstab [222]      0B     0B     0B   100%    /automount/Servers
    automount -static [222]     0B     0B     0B   100%    /automount/static
    /dev/disk1s10             500G   302G   197G    60%    /Volumes/ServiceRepairManuals
    /dev/disk1s14              80G    50G    30G    62%    /Volumes/Second-80
    /dev/disk2s1              446M    15M   431M     3%    /Volumes/2partitions
    /dev/disk2s2               46M   9.0M    37M    20%    /Volumes/second-disk
    mac $ # unmount disk by dragging to trash can.
    mac $ df -h
    Filesystem                Size   Used  Avail Capacity  Mounted on
    /dev/disk1s16             272G   259G    12G    95%    /
    devfs                     112K   112K     0B   100%    /dev
    fdesc                     1.0K   1.0K     0B   100%    /dev
    <volfs>                   512K   512K     0B   100%    /.vol
    automount -nsl [217]        0B     0B     0B   100%    /Network
    automount -fstab [222]      0B     0B     0B   100%    /automount/Servers
    automount -static [222]     0B     0B     0B   100%    /automount/static
    /dev/disk1s10             500G   302G   197G    60%    /Volumes/ServiceRepairManuals
    /dev/disk1s14              80G    50G    30G    62%    /Volumes/Second-80
    mac $ # figure out the name of the device.
    mac $ # see what dev disappeared.
    mac $ # in this case the unix names of the partitions are: /dev/disk2s1 & dev/disk2s2
    mac $ # the device, flash name, is /dev/disk2
    mac $ # pull out the device from it's usb port.  Plug it back in.
    mac $ df -h
    Filesystem                Size   Used  Avail Capacity  Mounted on
    /dev/disk1s16             272G   259G    12G    95%    /
    devfs                     113K   113K     0B   100%    /dev
    fdesc                     1.0K   1.0K     0B   100%    /dev
    <volfs>                   512K   512K     0B   100%    /.vol
    automount -nsl [217]        0B     0B     0B   100%    /Network
    automount -fstab [222]      0B     0B     0B   100%    /automount/Servers
    automount -static [222]     0B     0B     0B   100%    /automount/static
    /dev/disk1s10             500G   302G   197G    60%    /Volumes/ServiceRepairManuals
    /dev/disk1s14              80G    50G    30G    62%    /Volumes/Second-80
    /dev/disk2s1              446M    15M   431M     3%    /Volumes/2partitions
    /dev/disk2s2               46M   9.0M    37M    20%    /Volumes/second-disk
    mac $ dd if=/dev/disk2 bs=4096 | gzip | dd of=~/disk2-s1-2 bs=4096
    dd: /dev/disk2: No such file or directory
    0+1 records in
    0+1 records out
    20 bytes transferred in 0.014734 secs (1357 bytes/sec)
    mac $

  • Get native file in ucm (ucm and terastack solution working together)

    Hi,
    We use oracle universal content management server (ucm). A lot of files are stored on the hard disk of the system using this content management system. Now we are using Terastack Solution (http://www.hie-electronics.com/) to create backup of the data. The TeraStack Solution is an optical data storage system designed and manufactured to improve performance through affordable and reliable data storage management. Terastack solution archives (writes) all files to dvds and then a module of it truncates all these files to zero byte in size to save disk space. Now terastack solution watches all archived files. If an application tries to open such a file, it intercepts this, blocks this request, then restores the file from the dvd. During this process calling application just waits for the file to open. After restoring terastack solution sends a signal to the calling application, and the file with full contents is opened in the application.
    Now here is the problem:
    Files are check-in oracle content server. Terastack solution has burned these files to dvd and made these files to zero byte in size. Now when we click a link in content server to get a checked-in file (native file), terastack solution intercepts it, restore the file from dvd, then an open/save dialog box open to either open or save the file to a location. We save the file to a folder, open this file and come to know that there is no content in the file. It is still a zero byte file.
    When we checked the file at original location (remember ucm stores files in vault folder), we came to know that file is actually restored successfully by the terastack solution but the content server returned a zero byte file. When we click the link for the same file again to get native file in ucm then we get a fully restored file. i.e. on the first try to get native file we get a zero byte file although it is restored by terastack solution successfully. And on the second try we get file with full contents. On the second try, file has already been restored by terastack solution during the first try and terastack solution ignores files greater than zero byte in size, that’s why client gets a correct file on second try. Having size greater than zero means file is already restored.
    The link in ucm that is used to get native file does not point directly to the desired file. It calls some code in ucm that transmit the required file back to the client. Something like this:
    http://localhost/idc/idcplg?IdcService=GET_FILE&dID=11&dDocName=test_06&allowInterrupt=1
    I think what is going on here is, when we click on a link to get native file that is zero byte in size, content server creates a response for the file, append the size of the file (currently zero) to the header of the response along with other info, and then tries to transmit the file to the client. At this point, terastack solution intercept the request and restore the file. After restoring terastack solution send signal to calling application that file is restored. But the server has already created request for the file and it is not updated during or after the restore, that’s why client gets zero byte file.
    What I want is somehow force the content server to wait until file is fully restored by terastack solution and then transmit the fully restored file to client. Is there any configuration setting for ucm that will achieve the goal?
    Any setting in bin/intradoc.cfg or config/config.cfg or something else?
    Need help.
    Environment:
    OS: Windows XP SP3
    Content Server 10gR3 (Deployed to: IIS, JDK used: v1.5)
    TeraStack Solution (Deployed to: JBoss)

    Thank you for your reply. Although the links to weblayout version of files works perfectly with terastack, but we want to take backup of files in vault folder. Is it possible to change the links that are use to get native file? Can we somehow make these links to directly point to vault files? If yes please tell us how.
    A custom java service to download the native file can also work. Can you please give us a sample code and how to implement it in ucm?
    Please provide one of the solutions. I’m a new comer to ucm, so please provide instructions in more details.
    BTW, I tested the restoration of file using a test dotnet web application. I added code that downloaded a user selected file to the client. The code we used is as under:
    1. FileInfo fi = new FileInfo(filepath);
    2. Response.Clear();
    3. Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name);
    4. Response.AddHeader("Content-Length", fi.Length.ToString());
    5. Response.ContentType = GetFileContentType(fi.Extension);
    6. Response.TransmitFile(fi.FullName);
    7. Response.End();
    GetFileContentType() function is a simple function to get content type of a file type.
    Line#4 is important here. A file is zero byte in size when a request to download a file is received by the server, and the server just appends content-length=0 in the header. So even the file is restored by the terastack afterwards, client still receives a zero byte file. At this stage our test application has the same problem, not getting a native file with full contents.
    We removed line# 4 and tried again to download a file thru our test web application. This time client got file with full contents after the file is restored. So we think this Content-Length header is the one that needs to be handled.
    You may find this information useful if you decide to build a java service solution.

  • FM to get the file from application server to presenatation server automati

    Hi!
    In my upload program I am egtting the error log file onmy application server directly. Is there a function module or a way that in my abap code I can mention to bring the file or transfer the file to the presentation server . As my program is been run in the back ground so I cannot directly get the file on the presenattion server, so I need to bring it back on teh presentation server back to see teh eror log.
    I would like my program to do the transfer in background itself so that I can see the error log on a daily basis from my local file .
    Thanks
    when 'X'.                      "X is application server
    *         TRANSLATE p_err USING '\/'." correct slash for unix
          open dataset p_err2 for output in text mode encoding default.
          if sy-subrc = 0.
            loop at t_err into s_nts.
              transfer s_nts to p_err2.
              if sy-subrc ne 0.
                message i010(ad) with p_err2 'Download Failed'.
              endif.
            endloop.
            close dataset p_err2.
          else.
                message i010(ad) with p_err 'dataset could not be found'.
            sy-subrc = -1.             "Maintain error condition
          endif.
    *        endif.
          when ' '.                      "Blank is presenation server
            translate p_err using '/\'."correct slash Dos file
            call function 'DOWNLOAD'
              EXPORTING
                filename = p_err
                filetype = 'ASC'   "FTYPE set to DAT in DATA seg
              TABLES
                data_tab = t_err.
            if sy-subrc ne 0.
              message i010(ad) with 'File ' p_err 'cannot be located.'.
              sy-subrc = -1.             "Maintain error condition
              exit.
            endif.
        endcase.
      ENDIF.
    Thanks

    SO , after reading all , I assume that there is no way in which when I run the background job and get a errro file on application server can be retrievd on my presenattion serevr during the background job run. I was thinking that theer might be a functionn module which will convert the application server file into presenttion server file during the program run in background and store it in the location provided.
    I was trying to use FM  CALL FUNCTION 'C13Z_APPL_TO_FRONT_END' and  CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER' but using teh first one asks for source file and destination file name during teh program run and as it runs in background it cannot be provided again and again and teh second one dosent seem to work.
    Thanks

  • To read flat file from a unix server

    We need to read a flat file from a Unix server, where our Database is located.
    The location gets created correctly.
    But while we are trying to import files from the location in Design Center , we get an error that "directory does not exists", although the directory has all the permissions.
    Can someone please suggest how should we create the location so as it can read the files.
    Please Reply ASAP......

    We have started Design Center on a local machine(Windows Machine) with uaer as repository owner of the server,
    In the design center we can not sample the file till we import it,
    can you please tell how to sampe the file without importing it.
    Also a location pointing to server location gets easily created on the design center and the file module points to that location only, but when we try to import the file through that location, it says directory does not exists, although oracle user has all the read write permissions on the directory......
    Please help!

  • Getting .txt file data from servlet

    I am having problem finding the file I use "reguli.txt" to define page rules of a website.
    I use this file in a servlet.The file I copied it in the project folder,and also in /web/web-inf folder.
    The problem is I cant find the file without using all the path in this line: File filename = new File("reguli.txt");
          String filepath = filename.getAbsolutePath();
                FileInputStream file = new FileInputStream(filepath);
                InputStreamReader isr = new InputStreamReader(file);
                BufferedReader br = new BufferedReader(isr); I tried also:
    ServletContext context = getServletContext();
                InputStream contextPath = context.getResourceAsStream("/reguli.txt");
                InputStreamReader isr = new InputStreamReader(contextPath);
                BufferedReader br = new BufferedReader(isr);And I still get the same error:
    SEVERE: StandardWrapperValve[Servleet]: PWC1406: Servlet.service() for servlet Servleet threw exception
    java.io.FileNotFoundException: D:\Users\Stefan\GlassFish_v3_Prelude\glassfish\reguli.txt (The system cannot find the file specified)
    What am I doing wrong?

    Put the file directly under your webapps root context and access using following code
            String filename = "/InputFile.txt";
            ServletContext context = getServletContext();
            InputStream is = context.getResourceAsStream(filename); regards,
    nirvan.

  • In flash pro cc, how do i get the files i was working on previous session to open automatically?

    in flash pro cc, how do i get the files i was working on previous session to open automatically?

    cs4 had it 'on launch' --> last documents open, under general preferences. i don't see it in cc version, so i guess you're right. hard to understand, since it saved time.

Maybe you are looking for

  • How to get information about BBP_PDATT (attached document)

    Hello I'm writing a function module, and i want to get the attached document of a purchase order. I know the function module BBP_PD_PO_GETDETAIL gets this information but it is too long for me and i just need attached document. I found the Function m

  • Linking 2 computers with Logic node, anyone try it?

    Has anyone established a way to utilize 2 computers side by side to share the processing with logic? I have a macbook intell and a non intell mac mini, can anyone advise on this set up?

  • My jpeg file sizes are much larger than they used to be.

    Just recently the file sizes on my .jpeg files have become excessively larger than they used to be just a week or so ago. Where I used to go almost a week to need to archive to DVD a bunch of saved images, I've now got to save to DVD almost daily. Fo

  • Export/Import Identities

    Is it possible to export and import several identities?

  • WVC54GC and SKYPE

    Can anyone tell me how I can get my WVC54GC wireless camera to work with skype ?? thank you !!