I want to know how I can search for a specific file type: I have entered a SSH server and I am trying to search for a .jpg
file, but the owner of the server (my teacher) has removed all extensions.
I have tried grep -lr "JFIF"
and I have found many directories with the same file name, so I jumped into a random directory which was found with the grep
command and I tried to use the cat
command on it, but the terminal couldn't show the entire binary.
Also the strings
command is blocked on the ssh server, my teacher said that you have to find a jpg file and that this file contains a serial number (SN), but I have no idea where to find it.
If you guys want the SSH cardinals I will be happy to give them out to you, anyway my teacher said that you can use the file
command to do that but I don't know how to do it.
BTW : he said (SN)
Best Answer
I'll try to give you some hints so you can solve your HW yourself.
Follow this steps:
file
by executingman file
.file somefile
and see what happensfile
on different file typesfind
(or use google to find out how to use it to find all files in some directory and all subdirectories)-exec
option offind
in order to connect it with previously usedfile
command|
andgrep
command to find out how to filter only for JPEG files.