• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Find a file in multiple directory and get modified date and time

Scheduled Pinned Locked Moved General pfSense Questions
9 Posts 3 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y
    yunushaikh
    last edited by Nov 26, 2015, 2:05 PM

    Hello Experts,

    Can you help me with one command? Here is the scenario
    I have multiple directories on the server whose names starts with tomcat_
    Under this there is a file for example managetest.class

    Now I need to get only the modified date and time for that particular file in the below format

    Folder name            modifieddate

    Is this possible with any command.

    Any help will be appreciated.
    Thanks.

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Nov 26, 2015, 2:08 PM

      By server you mean pfsense?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • Y
        yunushaikh
        last edited by Nov 26, 2015, 2:14 PM

        I am really sorry but this is not related to pfsense.

        any help will be great for me if you can

        1 Reply Last reply Reply Quote 0
        • E
          Eskir
          last edited by Nov 26, 2015, 2:21 PM Nov 26, 2015, 2:15 PM

          Looking at it from a unix perspective something like

          ls -all -t -d tomcat_*/ 
          

          Edit: This doesn't exactly fit your requirement but if you read more into the -less/-all parameter (provided you're even on unix/linux) I'm sure you'll find the answer.

          Edit2: If the file is always named the same you might want to check

          ls -all -t tomcat_*/filename.filetype 
          

          (Kind of misread your question at first)

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by Nov 26, 2015, 2:20 PM

            Well then go to a linux board..  You do understand this a forum for support of pfsense, which is based on freebsd..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • Y
              yunushaikh
              last edited by Nov 26, 2015, 2:22 PM

              This command is giving me lot of things like permissions and owner group

              I just need modified date and time of that file

              1 Reply Last reply Reply Quote 0
              • E
                Eskir
                last edited by Nov 26, 2015, 2:22 PM

                @johnpoz:

                Well then go to a linux board..  You do understand this a forum for support of pfsense, which is based on freebsd..

                This is a good point actually, stackexchange is a great resource there.

                1 Reply Last reply Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator
                  last edited by Nov 26, 2015, 2:23 PM

                  ^ exactly do you go to a bank and order a bigmac??

                  While there are quite often topics on networking, and even some server stuff - its normally related to getting stuff working through the firewall or networking with pfsense, etc..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • Y
                    yunushaikh
                    last edited by Nov 26, 2015, 2:25 PM

                    Its ok man,
                    Sorry for this topic.
                    Thanks for your help.

                    1 Reply Last reply Reply Quote 0
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received