Viewing files

For text files and data files, you might want to usec**at,moreorless**to view the contents.

catfilenamemorefilename lessfilename

Be aware that if the output is not standard text, then you might corrupt the terminal output (type “reset” at the prompt and it should clear up). It is best to run these commands in a terminal window in X so that you can simply close out a corrupted terminal and start another. Using thefilecommand will give you a good idea of which files will be viewable.

Perhaps a better alternative for viewing unknown files would be to use thestringscommand. This command can be used to parse regular ASCII text out of any file. It’s good for formatted documents (MS Word or Star Office), data files (Excel, etc.) andeven binaries (i.e. unidentified executables) which might have interesting text strings hidden in them. It might be best to pipe the output throughless.

strings**filename**| less

Have a look at the contents of the practice disk on/mnt/analysis. There is a file calledarp.exe. What does this file do? We can’t execute it, and from using thefilecommand we know that it’s an i386 executable. Run the following command (again, assuming you are in the_/mnt/analysis_directory) and scroll through theoutput. Do you find anything of interest (hint: like a usage message)?

strings arp.exe | less

If you are currently running the X window system, you can use any of the graphics tools that come standard with whichever Linux distribution you are using. gqviewis one graphics tool for theGnomedesktop that will display thumbnails of all the recognized graphic files in a directory. Experiment a little. konquerorfrom theKDEdesktop has a feature that will create a very nice html image gallery for you from all images in a directory. There are_g-scripts_that will do the same for theNautilusfile manager underGnome.

Once you are finished exploring, be sure to unmount the floppy (or loop mounted disk image). Again, make sure you are not anywhere in the mount point when you try to unmount, or you will get the “busy” error.

umount /mnt/analysis

results matching ""

    No results matching ""