How do I change the “Last-Modified” time format from the curl-head standard output?Search and print the lines from the output which can contain lines with errorsHow to capture output from tcpdumpHow to remove all but number from hexdump output?How to capture lines between two strings from a file, but only the last occurrence?Rename and convert dates in filename without file extensionCurl for file download via POSTSet date and time from http header in router with curl or wgetls command: Show time only (in iso-format)date command output format

How to prevent discontent among the players when one player murders the others' characters?

I’m 18 years old and want to finance a £30,000 car

Why doesn't std::function participate in overload resolution?

Would a uranium 235 fuel pellet the size of Earth explode?

I am ask to complete my withdrawal transaction with COT fee of 1200 dollars

Any real contribution of functional analysis to quantum theory as a branch of physics?

Sorting marbles based on weightings

I've never seen this before. Is this primarily a "rote computational trick" for multiplication by 9 ...?

What are the disadvantages of using zener diode over a linear voltage regulator?

LP how to sum up positive free variables and negative free variables separately?

How to correctly export env variables containing spaces in ZSH

Why is wired Ethernet losing its speed advantage over wireless?

An Ailing Assassin

Is there a Scoville scale for coldness?

Solve unwanted white "waves" and "Pacman squares" in low-light picture - post using Google Photos

Secure Implementation of Password Database

What would you call this scale?

Is it possible to kill parasitic worms by intoxicating oneself?

Unexpected large rent payments, by moneygram, for my apartment, not by me

How to play vs the 1...e6 and 2...d6 Pawn structure?

How to find the operand of a sinusoid?

Can I combine ground an neutral wires before they connect to their bus bars?

Predicting y from log y as the dependent variable

Definition of "worst point one percent"?



How do I change the “Last-Modified” time format from the curl-head standard output?


Search and print the lines from the output which can contain lines with errorsHow to capture output from tcpdumpHow to remove all but number from hexdump output?How to capture lines between two strings from a file, but only the last occurrence?Rename and convert dates in filename without file extensionCurl for file download via POSTSet date and time from http header in router with curl or wgetls command: Show time only (in iso-format)date command output format






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1


















The following command can get the modification time of the remote file, how to modify the output time format?



# curl -sI https://sgp-ping.vultr.com/vultr.com.100MB.bin | grep Last-Modified | cut -c16-
Mon, 29 Apr 2019 20:22:54 GMT


I want to convert to Y-m-d H:i:s time format. any help is much appreciated.










share|improve this question

































    1


















    The following command can get the modification time of the remote file, how to modify the output time format?



    # curl -sI https://sgp-ping.vultr.com/vultr.com.100MB.bin | grep Last-Modified | cut -c16-
    Mon, 29 Apr 2019 20:22:54 GMT


    I want to convert to Y-m-d H:i:s time format. any help is much appreciated.










    share|improve this question





























      1













      1









      1








      The following command can get the modification time of the remote file, how to modify the output time format?



      # curl -sI https://sgp-ping.vultr.com/vultr.com.100MB.bin | grep Last-Modified | cut -c16-
      Mon, 29 Apr 2019 20:22:54 GMT


      I want to convert to Y-m-d H:i:s time format. any help is much appreciated.










      share|improve this question
















      The following command can get the modification time of the remote file, how to modify the output time format?



      # curl -sI https://sgp-ping.vultr.com/vultr.com.100MB.bin | grep Last-Modified | cut -c16-
      Mon, 29 Apr 2019 20:22:54 GMT


      I want to convert to Y-m-d H:i:s time format. any help is much appreciated.







      command-line curl date






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 1 at 2:36







      Matthew

















      asked Oct 1 at 2:18









      MatthewMatthew

      133 bronze badges




      133 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          0



















          pipe it to date command and use its formatting controls to format as you expect like:



          ... |date -f- '+%Y-%m-%d %T'


          see more formatting controls in man date






          share|improve this answer


























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177799%2fhow-do-i-change-the-last-modified-time-format-from-the-curl-head-standard-outp%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0



















            pipe it to date command and use its formatting controls to format as you expect like:



            ... |date -f- '+%Y-%m-%d %T'


            see more formatting controls in man date






            share|improve this answer





























              0



















              pipe it to date command and use its formatting controls to format as you expect like:



              ... |date -f- '+%Y-%m-%d %T'


              see more formatting controls in man date






              share|improve this answer



























                0















                0











                0









                pipe it to date command and use its formatting controls to format as you expect like:



                ... |date -f- '+%Y-%m-%d %T'


                see more formatting controls in man date






                share|improve this answer














                pipe it to date command and use its formatting controls to format as you expect like:



                ... |date -f- '+%Y-%m-%d %T'


                see more formatting controls in man date







                share|improve this answer













                share|improve this answer




                share|improve this answer










                answered Oct 1 at 5:11









                αғsнιηαғsнιη

                28.8k23 gold badges108 silver badges170 bronze badges




                28.8k23 gold badges108 silver badges170 bronze badges































                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177799%2fhow-do-i-change-the-last-modified-time-format-from-the-curl-head-standard-outp%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown









                    Popular posts from this blog

                    Tamil (spriik) Luke uk diar | Nawigatjuun

                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                    Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?