FIND command ouput - Redhat

This is a discussion on FIND command ouput - Redhat ; Greetings, I'm looking for a way to use the find command to print out the full file names (with directories), text based permissions and the date- time information. Using 'find `pwd` -ls' gives me: 4472722 0 srwxr-xr-x 1 root root ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: FIND command ouput

  1. FIND command ouput

    Greetings,

    I'm looking for a way to use the find command to print out the full
    file names (with directories), text based permissions and the date-
    time information.

    Using 'find `pwd` -ls' gives me:

    4472722 0 srwxr-xr-x 1 root root 0 Mar 3 16:11 /
    tmp/mapping-root

    for example, which is OK - except I want the date in a different
    format - for instance like the ls command produces:

    srwxr-xr-x 1 root root 0 2008-03-03 16:11 /tmp/mapping-root

    I'm thinking there's some sort of environment variable that would help
    me - I don't want to mess with the 'find -printf' formatting if I
    don't have to... Of course if there's a way to make the ls command
    printout the full path name (for each file) then that would be even
    easier...

    thanks,
    pg

  2. Re: FIND command ouput

    On Mon, 17 Mar 2008 07:25:52 -0700, pgodfrin typed this message:

    > Greetings,
    >
    > I'm looking for a way to use the find command to print out the full file
    > names (with directories), text based permissions and the date- time
    > information.
    >
    > Using 'find `pwd` -ls' gives me:
    >
    > 4472722 0 srwxr-xr-x 1 root root 0 Mar 3 16:11 /
    > tmp/mapping-root
    >
    > for example, which is OK - except I want the date in a different format
    > - for instance like the ls command produces:
    >
    > srwxr-xr-x 1 root root 0 2008-03-03 16:11 /tmp/mapping-root
    >
    > I'm thinking there's some sort of environment variable that would help
    > me - I don't want to mess with the 'find -printf' formatting if I don't
    > have to... Of course if there's a way to make the ls command printout
    > the full path name (for each file) then that would be even easier...
    >
    > thanks,
    > pg


    Dude !!??

    Man ls

    man find
    -exec 'ls --Format' {} \;


  3. Re: FIND command ouput

    On Mar 17, 11:14 pm, noi ance wrote:
    > On Mon, 17 Mar 2008 07:25:52 -0700, pgodfrin typed this message:
    >
    >
    >
    > > Greetings,

    >
    > > I'm looking for a way to use the find command to print out the full file
    > > names (with directories), text based permissions and the date- time
    > > information.

    >
    > > Using 'find `pwd` -ls' gives me:

    >
    > > 4472722 0 srwxr-xr-x 1 root root 0 Mar 3 16:11 /
    > > tmp/mapping-root

    >
    > > for example, which is OK - except I want the date in a different format
    > > - for instance like the ls command produces:

    >
    > > srwxr-xr-x 1 root root 0 2008-03-03 16:11 /tmp/mapping-root

    >
    > > I'm thinking there's some sort of environment variable that would help
    > > me - I don't want to mess with the 'find -printf' formatting if I don't
    > > have to... Of course if there's a way to make the ls command printout
    > > the full path name (for each file) then that would be even easier...

    >
    > > thanks,
    > > pg

    >
    > Dude !!??
    >
    > Man ls
    >
    > man find
    > -exec 'ls --Format' {} \;


    hmm - didn't see --format in my man (Fedora 8), but this is what I
    used:
    find -printf '%M %16u %16g %12s %TY-%Tm-%Td %TT %p\n'

  4. Re: FIND command ouput

    On Tue, 18 Mar 2008 10:42:58 -0700, pgodfrin typed this message:

    > On Mar 17, 11:14 pm, noi ance wrote:
    >> On Mon, 17 Mar 2008 07:25:52 -0700, pgodfrin typed this message:
    >>
    >>
    >>
    >> > Greetings,

    >>
    >> > I'm looking for a way to use the find command to print out the full
    >> > file names (with directories), text based permissions and the date-
    >> > time information.

    >>
    >> > Using 'find `pwd` -ls' gives me:

    >>
    >> > 4472722 0 srwxr-xr-x 1 root root 0 Mar 3 16:11
    >> > /
    >> > tmp/mapping-root

    >>
    >> > for example, which is OK - except I want the date in a different
    >> > format - for instance like the ls command produces:

    >>
    >> > srwxr-xr-x 1 root root 0 2008-03-03 16:11 /tmp/mapping-root

    >>
    >> > I'm thinking there's some sort of environment variable that would
    >> > help me - I don't want to mess with the 'find -printf' formatting if
    >> > I don't have to... Of course if there's a way to make the ls command
    >> > printout the full path name (for each file) then that would be even
    >> > easier...

    >>
    >> > thanks,
    >> > pg

    >>
    >> Dude !!??
    >>
    >> Man ls
    >>
    >> man find
    >> -exec 'ls --Format' {} \;

    >
    > hmm - didn't see --format in my man (Fedora 8), but this is what I used:
    > find -printf '%M %16u %16g %12s %TY-%Tm-%Td %TT %p\n'


    My fault, I wrote before thinking (and reading) with the --Format.
    But the example was still correct, I was thinking use of the -exec option

    find `pwd` -exec ls -l --time-style=locale {}\;

  5. Re: FIND command ouput

    On Mar 18, 1:50 pm, noi ance wrote:
    > On Tue, 18 Mar 2008 10:42:58 -0700,pgodfrintyped this message:
    >
    >
    >
    > > On Mar 17, 11:14 pm, noi ance wrote:
    > >> On Mon, 17 Mar 2008 07:25:52 -0700,pgodfrintyped this message:

    >
    > >> > Greetings,

    >
    > >> > I'm looking for a way to use the find command to print out the full
    > >> > file names (with directories), text based permissions and the date-
    > >> > time information.

    >
    > >> > Using 'find `pwd` -ls' gives me:

    >
    > >> > 4472722 0 srwxr-xr-x 1 root root 0 Mar 3 16:11
    > >> > /
    > >> > tmp/mapping-root

    >
    > >> > for example, which is OK - except I want the date in a different
    > >> > format - for instance like the ls command produces:

    >
    > >> > srwxr-xr-x 1 root root 0 2008-03-03 16:11 /tmp/mapping-root

    >
    > >> > I'm thinking there's some sort of environment variable that would
    > >> > help me - I don't want to mess with the 'find -printf' formatting if
    > >> > I don't have to... Of course if there's a way to make the ls command
    > >> > printout the full path name (for each file) then that would be even
    > >> > easier...

    >
    > >> > thanks,
    > >> > pg

    >
    > >> Dude !!??

    >
    > >> Man ls

    >
    > >> man find
    > >> -exec 'ls --Format' {} \;

    >
    > > hmm - didn't see --format in my man (Fedora 8), but this is what I used:
    > > find -printf '%M %16u %16g %12s %TY-%Tm-%Td %TT %p\n'

    >
    > My fault, I wrote before thinking (and reading) with the --Format.
    > But the example was still correct, I was thinking use of the -exec option
    >
    > find `pwd` -exec ls -l --time-style=locale {}\;


    very cool - i did try that out - but - I found using the printf
    function a little easier - specifically cause it permits me to
    generate fixed length output - which is then easily processed by the
    perl unpack statement.

    Thanks for the advice - nice to have someone to bounce ideas off
    off...

    cheers,
    pg

+ Reply to Thread