- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can I use 'vi' to edit the file with the suf...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 06:33 PM
10-23-2005 06:33 PM
can I use 'vi' to edit the file with the suffix 'bin'??
how I can edit the file with the suffix 'bin'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 06:37 PM
10-23-2005 06:37 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 06:39 PM
10-23-2005 06:39 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 06:45 PM
10-23-2005 06:45 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
vi is not helpful if it is a binary file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 07:06 PM
10-23-2005 07:06 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
# file
It has to be in text format to edit it. If it is a object file then it will not be in readable format.
If it is a text formatted one then use perl / sed to edit.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 07:13 PM
10-23-2005 07:13 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
do this first:
# file
if it is a text/ascii file, editing will make sense, else quite pointless.
regards.
(p.s. please remember to assign points.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 07:43 PM
10-23-2005 07:43 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2005 08:09 PM
10-23-2005 08:09 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 12:42 AM
10-24-2005 12:42 AM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
#file cluma
cluma :command text( this is output)
can I edit it with "vi"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 12:46 AM
10-24-2005 12:46 AM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 06:12 PM
10-24-2005 06:12 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
Hi,
Check out file information as,
# file file_name
# strings file_name
s2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 06:25 PM
10-24-2005 06:25 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
Extensions on unix don't really mean a thing. They are just a couple of characters that are part of te filename, just like any other character in the filename.
Filename extensions are only a way for humans to put something in the filename that is linked to the type of content in the file, but computers have no use for it at all.
To find out what is really in a file, don't look at the extension. Use the "file" and "strings" commands that are already referenced above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 06:48 PM
10-24-2005 06:48 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 07:54 PM
10-24-2005 07:54 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
E.g.
vis filename >tmpfile
vi tmpfile
inv tmpfile >filename
(See 'man inv' for the character substitutions done.)
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2005 09:25 PM
10-24-2005 09:25 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
So one cannot say beforehand if a file is a binary just from its name
(though there are sensible naming conventions).
A better indicator of a file's content type is its magic number.
The "file" command that you used will read that and tell you from looking up a table what type it is if it found a match.
Since it tells you "command text" I think it's safe to open the file with vi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2005 04:26 PM
10-25-2005 04:26 PM
Re: can I use 'vi' to edit the file with the suffix 'bin'??
The command
"file
e.g
>file /usr/bin/ls
/usr/bin/ls: PA-RISC1.1 shared executable dynamically linked
In case it is an executable (which is what I assume you are looking for), you may get limited information about the file using commands like "strings" !!
However to edit the file, you will require to have the source for the binary, and only that you may edit and re-build the binary.