finding a serial number of a jpg file in linux terminalstopped ssh, need way to connect againSSH Permission denied (public key), but root ssh worksssh server: allow only login with keyHaving issues creating a SOCKS5 Proxy. Can not Tunnel deviceError interpreting JPEG imageGetting error while connecting Github through ssh key using RORconnect to host xx.xx.xx.xx port 22: Connection timed outInstalling an application on Ubuntu (new user)

Is there any reason nowadays to use a neon indicator lamp instead of an LED?

What do you do if you have developments on your paper during the long peer review process?

Does Diablo III have a loot filter?

What's the story to "WotC gave up on fixing Polymorph"?

Is it really necessary to have a four hour meeting in Sprint planning?

Safely hang a mirror that does not have hooks

Performance for simple code that converts a RGB tuple to hex string

Leaving a job that I just took based on false promise of a raise. What do I tell future interviewers?

A drug that allows people to survive on less food

Is the mass of paint relevant in rocket design?

Is It Possible to Have Different Sea Levels, Eventually Causing New Landforms to Appear?

What is the need of methods like GET and POST in the HTTP protocol?

Writing a letter of recommendation for a mediocre student

Worms crawling under skin

How to ask a man to not take up more than one seat on public transport while avoiding conflict?

What is this utensil for?

What is the meaning of word 'crack' in chapter 33 of A Game of Thrones?

Was there a trial by combat between a man and a dog in medieval France?

Why does NASA publish all the results/data it gets?

Guitar tuning (EADGBE), "perfect" fourths?

The quicker I go up, the sooner I’ll go down - Riddle

What are these pixel-level discolored specks? How can I fix it?

Is it possible to encode a message in such a way that can only be read by someone or something capable of seeing into the very near future?

Would Taiwan and China's dispute be solved if Taiwan gave up being the Republic of China?



finding a serial number of a jpg file in linux terminal


stopped ssh, need way to connect againSSH Permission denied (public key), but root ssh worksssh server: allow only login with keyHaving issues creating a SOCKS5 Proxy. Can not Tunnel deviceError interpreting JPEG imageGetting error while connecting Github through ssh key using RORconnect to host xx.xx.xx.xx port 22: Connection timed outInstalling an application on Ubuntu (new user)






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








0















I have issues decoding my jpg file to find it'sserial number from my linux terminal thought ssh .
my file and detail of command I did
M5KDAN44



grep "serial number" M5KDAN44


my error serialnumber is a value and not a sting to find
please help










share|improve this question



















  • 2





    A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

    – waltinator
    Apr 15 at 17:26











  • @William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

    – Vijay
    Apr 15 at 17:44







  • 2





    Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

    – N0rbert
    Apr 15 at 19:42











  • @Vijay yes that's right but i need to find it's serial number (SN)

    – William Mollet
    Apr 15 at 22:14











  • @William Mollet I have edited the answer.

    – Vijay
    Apr 16 at 18:28

















0















I have issues decoding my jpg file to find it'sserial number from my linux terminal thought ssh .
my file and detail of command I did
M5KDAN44



grep "serial number" M5KDAN44


my error serialnumber is a value and not a sting to find
please help










share|improve this question



















  • 2





    A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

    – waltinator
    Apr 15 at 17:26











  • @William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

    – Vijay
    Apr 15 at 17:44







  • 2





    Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

    – N0rbert
    Apr 15 at 19:42











  • @Vijay yes that's right but i need to find it's serial number (SN)

    – William Mollet
    Apr 15 at 22:14











  • @William Mollet I have edited the answer.

    – Vijay
    Apr 16 at 18:28













0












0








0








I have issues decoding my jpg file to find it'sserial number from my linux terminal thought ssh .
my file and detail of command I did
M5KDAN44



grep "serial number" M5KDAN44


my error serialnumber is a value and not a sting to find
please help










share|improve this question














I have issues decoding my jpg file to find it'sserial number from my linux terminal thought ssh .
my file and detail of command I did
M5KDAN44



grep "serial number" M5KDAN44


my error serialnumber is a value and not a sting to find
please help







ssh syslinux jpeg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 15 at 16:39









William MolletWilliam Mollet

1




1










  • 2





    A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

    – waltinator
    Apr 15 at 17:26











  • @William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

    – Vijay
    Apr 15 at 17:44







  • 2





    Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

    – N0rbert
    Apr 15 at 19:42











  • @Vijay yes that's right but i need to find it's serial number (SN)

    – William Mollet
    Apr 15 at 22:14











  • @William Mollet I have edited the answer.

    – Vijay
    Apr 16 at 18:28












  • 2





    A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

    – waltinator
    Apr 15 at 17:26











  • @William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

    – Vijay
    Apr 15 at 17:44







  • 2





    Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

    – N0rbert
    Apr 15 at 19:42











  • @Vijay yes that's right but i need to find it's serial number (SN)

    – William Mollet
    Apr 15 at 22:14











  • @William Mollet I have edited the answer.

    – Vijay
    Apr 16 at 18:28







2




2





A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

– waltinator
Apr 15 at 17:26





A .jpg file is usually an image in "JPEG" binary format (see en.wikipedia.org/wiki/JPEG_File_Interchange_Format ), so grep is inappropriate. Also, what is the "serial number" of which you speak? The command you list searches for the text string "serial number" in the file called M5KDAN44.

– waltinator
Apr 15 at 17:26













@William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

– Vijay
Apr 15 at 17:44






@William Mollet Do you mean you have jpg files without the extension in the file name, e.g 123 in place of 123.jpg.

– Vijay
Apr 15 at 17:44





2




2





Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

– N0rbert
Apr 15 at 19:42





Do you mean meta-information inside the image? Something like exiftool image.jpg | grep "serial number"?

– N0rbert
Apr 15 at 19:42













@Vijay yes that's right but i need to find it's serial number (SN)

– William Mollet
Apr 15 at 22:14





@Vijay yes that's right but i need to find it's serial number (SN)

– William Mollet
Apr 15 at 22:14













@William Mollet I have edited the answer.

– Vijay
Apr 16 at 18:28





@William Mollet I have edited the answer.

– Vijay
Apr 16 at 18:28










1 Answer
1






active

oldest

votes


















3
















Change directory to the target directory



cd /path/to/dir/with/files


To find jpg (JPEG) files if the extension is removed.



OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg|cut -d ":" -f 1`;do echo "$f";done;IFS="$OIFS"


For the Serial Number of the camera in EXIF data.

The command is:



exiftool <file-name> | grep '^Serial Number' 


Example



exiftool IMG_0277 | grep '^Serial Number'
Serial Number : 078073094979


Both commands combined to find jpg (JPEG) files and get the Serial Number.



OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"


Example:



OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"
./IMG_9862 07.JPG image/jpeg Serial Number : 078073094979
./008 image/jpeg
./IMG_0277 06 image/jpeg Serial Number : 078073094979
./new folder/IMG_0277 06 image/jpeg Serial Number : 078073094979
./new folder/008 03 image/jpeg
./DSC04592 05 image/jpeg
./008 03 image/jpeg



Note: Not all jpg files have 'Serial Number' in EXIF data.

The Serial Number of the camera is written by most newer DSLR cameras in EXIF data






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%2f1134132%2ffinding-a-serial-number-of-a-jpg-file-in-linux-terminal%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









    3
















    Change directory to the target directory



    cd /path/to/dir/with/files


    To find jpg (JPEG) files if the extension is removed.



    OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg|cut -d ":" -f 1`;do echo "$f";done;IFS="$OIFS"


    For the Serial Number of the camera in EXIF data.

    The command is:



    exiftool <file-name> | grep '^Serial Number' 


    Example



    exiftool IMG_0277 | grep '^Serial Number'
    Serial Number : 078073094979


    Both commands combined to find jpg (JPEG) files and get the Serial Number.



    OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"


    Example:



    OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"
    ./IMG_9862 07.JPG image/jpeg Serial Number : 078073094979
    ./008 image/jpeg
    ./IMG_0277 06 image/jpeg Serial Number : 078073094979
    ./new folder/IMG_0277 06 image/jpeg Serial Number : 078073094979
    ./new folder/008 03 image/jpeg
    ./DSC04592 05 image/jpeg
    ./008 03 image/jpeg



    Note: Not all jpg files have 'Serial Number' in EXIF data.

    The Serial Number of the camera is written by most newer DSLR cameras in EXIF data






    share|improve this answer































      3
















      Change directory to the target directory



      cd /path/to/dir/with/files


      To find jpg (JPEG) files if the extension is removed.



      OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg|cut -d ":" -f 1`;do echo "$f";done;IFS="$OIFS"


      For the Serial Number of the camera in EXIF data.

      The command is:



      exiftool <file-name> | grep '^Serial Number' 


      Example



      exiftool IMG_0277 | grep '^Serial Number'
      Serial Number : 078073094979


      Both commands combined to find jpg (JPEG) files and get the Serial Number.



      OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"


      Example:



      OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"
      ./IMG_9862 07.JPG image/jpeg Serial Number : 078073094979
      ./008 image/jpeg
      ./IMG_0277 06 image/jpeg Serial Number : 078073094979
      ./new folder/IMG_0277 06 image/jpeg Serial Number : 078073094979
      ./new folder/008 03 image/jpeg
      ./DSC04592 05 image/jpeg
      ./008 03 image/jpeg



      Note: Not all jpg files have 'Serial Number' in EXIF data.

      The Serial Number of the camera is written by most newer DSLR cameras in EXIF data






      share|improve this answer





























        3














        3










        3









        Change directory to the target directory



        cd /path/to/dir/with/files


        To find jpg (JPEG) files if the extension is removed.



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg|cut -d ":" -f 1`;do echo "$f";done;IFS="$OIFS"


        For the Serial Number of the camera in EXIF data.

        The command is:



        exiftool <file-name> | grep '^Serial Number' 


        Example



        exiftool IMG_0277 | grep '^Serial Number'
        Serial Number : 078073094979


        Both commands combined to find jpg (JPEG) files and get the Serial Number.



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"


        Example:



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"
        ./IMG_9862 07.JPG image/jpeg Serial Number : 078073094979
        ./008 image/jpeg
        ./IMG_0277 06 image/jpeg Serial Number : 078073094979
        ./new folder/IMG_0277 06 image/jpeg Serial Number : 078073094979
        ./new folder/008 03 image/jpeg
        ./DSC04592 05 image/jpeg
        ./008 03 image/jpeg



        Note: Not all jpg files have 'Serial Number' in EXIF data.

        The Serial Number of the camera is written by most newer DSLR cameras in EXIF data






        share|improve this answer















        Change directory to the target directory



        cd /path/to/dir/with/files


        To find jpg (JPEG) files if the extension is removed.



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg|cut -d ":" -f 1`;do echo "$f";done;IFS="$OIFS"


        For the Serial Number of the camera in EXIF data.

        The command is:



        exiftool <file-name> | grep '^Serial Number' 


        Example



        exiftool IMG_0277 | grep '^Serial Number'
        Serial Number : 078073094979


        Both commands combined to find jpg (JPEG) files and get the Serial Number.



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"


        Example:



        OIFS="$IFS";IFS=$'n';for f in `find ./ -type f -exec file --mime-type ;|grep image/jpeg | cut -d ":" -f 1`;do echo "$f" `file --mime-type "$f"|cut -d ":" -f 2` `exiftool "$f"|grep '^Serial'`;done;IFS="$OIFS"
        ./IMG_9862 07.JPG image/jpeg Serial Number : 078073094979
        ./008 image/jpeg
        ./IMG_0277 06 image/jpeg Serial Number : 078073094979
        ./new folder/IMG_0277 06 image/jpeg Serial Number : 078073094979
        ./new folder/008 03 image/jpeg
        ./DSC04592 05 image/jpeg
        ./008 03 image/jpeg



        Note: Not all jpg files have 'Serial Number' in EXIF data.

        The Serial Number of the camera is written by most newer DSLR cameras in EXIF data







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 19 at 16:24

























        answered Apr 16 at 13:26









        VijayVijay

        2,8572 gold badges10 silver badges25 bronze badges




        2,8572 gold badges10 silver badges25 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%2f1134132%2ffinding-a-serial-number-of-a-jpg-file-in-linux-terminal%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?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?