Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-24-2013
Registered User
 
Join Date: Sep 2012
Location: Melbourne
Posts: 74
Thanks: 5
Thanked 7 Times in 5 Posts
How to Open a data format file?

Hi,
Am having a file. I checked that file format by the following command

Code:
file filename

Output is

Code:
filename: data

So the file is data format file
Am trying to view that file so i have used some commands like cat,more so on but it showing the contents like compressed form(full of Symbols). How do I view the exact contents??

I have tried

Code:
more filename

Output

Code:
 http://www.google.co.in/url?sa=t&rct=j&q=unix%20complex%20commands&source=web&cd=7&sqi=2&ved=0CGUQFjAG&url=http%3A%2F%2Fwww.december.com%2Funix%2Ftutor%2Fpipesfilters.html&ei=0vv_UIGfCIiSrgeCtYGYDg&usg=AFQjCNF7qfE2mZcLtln_vS7-tyW4P3ETww&bvm=bv.41248874,d.bmk&cad=rja3�����2.����3Hhttp://www.softwaretestinghelp.com/advanced-unix-c�http://www.softwaretestinghelp.com/advanced-unix-commands-with-examples/�http://www.softwaretestinghelp.com/advanced-unix-commands-with-examples/�����Soft Skill for Testers: Advanced Unix commands with examples   Software Testing Help���URhttp://www.google.co.in/url?sa=t&rct=j&q=advanced%20unix%20commands%20with%20examples&source=web&cd=2&ved=0CDQQFjAB&url=http%3A%2F%2Fwww.softwaretestinghelp.com%2Fadvanced-unix-commands-with-examples%2F&ei=-_v_UMbCBcfLrQejh4CQCA&usg=AFQjCNFh_C98SLXEQO9JsRdN2Yi-EPeXYg&bvm=bv.41248874,d.bmk&cad=rjaK`
?% WebKit serialized form state version 8 
=&�http://www.softwaretestinghelp.com/search-software-testing.html [cx cof ] #13ie
                                                                                    hidden0cx

Help me. .
Sponsored Links
    #2  
Old 01-24-2013
Registered User
 
Join Date: Oct 2010
Location: Southern NJ, USA (Nord)
Posts: 3,786
Thanks: 8
Thanked 469 Times in 449 Posts
Well, data is a bit of a catch-all. You can look at it using a text scrren with 'od' or 'cat -vt' to see if it has structure, like linefeeds, tabs, etc. The stuff above looks like a mix of binary and URL.
Sponsored Links
    #3  
Old 01-24-2013
Registered User
 
Join Date: Sep 2012
Location: Melbourne
Posts: 74
Thanks: 5
Thanked 7 Times in 5 Posts
cat -vt and od doesn't work for me..
string command works little bit.. but is there any other command to get the exact thing..
    #4  
Old 01-24-2013
Registered User
 
Join Date: Oct 2010
Location: Southern NJ, USA (Nord)
Posts: 3,786
Thanks: 8
Thanked 469 Times in 449 Posts
If you use od to find a separator character, you can use tr to change it to linefeed (\12). tr uses octal by default after '\'. For instance, if the lines are carraige return separated:
Code:
tr '\15' '\12' <file | more

Sponsored Links
    #5  
Old 01-24-2013
wisecracker's Avatar
Registered User
 
Join Date: Jan 2013
Location: Loughborough
Posts: 119
Thanks: 11
Thanked 15 Times in 13 Posts
You could try something like:-


Code:
hexdump -C yourfile > texthexdump.txt

This will give a complete text hexdump with ascii dump and relative offstes too...

Just read the text file in the normal way...
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Masking data for different file format Alvin123 Shell Programming and Scripting 4 06-11-2011 05:41 AM
Format/Fix Timestamp Data in a File. mtlrsk UNIX for Dummies Questions & Answers 3 01-08-2011 09:50 AM
I want some selected data from first file and put into other file in specified format shreyas UNIX for Dummies Questions & Answers 5 04-29-2009 05:43 AM
Sed to format data in a file cnilashis UNIX for Advanced & Expert Users 2 08-15-2008 02:37 AM
how to number format a data file without using SED? Cactus Jack UNIX for Dummies Questions & Answers 3 01-12-2008 06:47 PM



All times are GMT -4. The time now is 03:11 PM.