- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Unix Question
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
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
11-01-2004 03:45 AM
11-01-2004 03:45 AM
I have some files containing "null characters" (Octal display show as \0). The questions
that I have is:
1. Why are they caused?
2. How can I delete them?
Thanks
Brian.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 04:21 AM
11-01-2004 04:21 AM
Re: Unix Question
Here is a technique to remove the NUL's:
tr -d "\000" < infile > outfile
As an example, it would be state of the art stupid to apply the above command to /etc/lvmtab which typically contains a number of NUL's (all normal).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 04:38 AM
11-01-2004 04:38 AM
Re: Unix Question
What is the full directory path?
Are these text files or binary files?
Why are you concerned about the null characters?
A little more detail is required...
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 04:54 AM
11-01-2004 04:54 AM
Re: Unix Question
Could you explain what the command does pl.
Thanks
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 04:59 AM
11-01-2004 04:59 AM
Re: Unix Question
>> Could you explain what the command does pl.
He could, but I'm sure he'd prefer you would just hit the man page for 'tr': man tr
[tr 'translates' one character to an other. the -d option alters that to a deleted instead of translate. ]
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 05:03 AM
11-01-2004 05:03 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2004 05:40 AM
11-01-2004 05:40 AM
Re: Unix Question
It depends on what application is writing the files, but it sounds like it might be a bug. What type of files are they, and what are some of the filenames?
One way that you can delete them is to use the find command. Something like this might work:
find . -name "*somestring*" -exec rm {} \;
Where "*somestring*" is some string pattern of non-null characters that matches the filename.
I would try the 'find' without the rm first, just to be safe and to make certain that it just finds the files you are interested in:
find . -name "*somestring*"
If that doesn't work, you could try doing it by inode number. Do an 'ls -li' to see the inode number of all the files. Look for the files with the bad filenames, and then pass the inode number to the find command:
find . -inum 1234
JP