- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- non printable characters in all filenames
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
Discussions
Discussions
Forums
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
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
тАО05-12-2009 01:19 PM
тАО05-12-2009 01:19 PM
non printable characters in all filenames
All new files, post delivery, also contain these unprintable characters.
For example:
^[[00;34mOraInstall2009-03-16_04-20-42PM^[[00m
Note:
# ls -q
# ls -b
Does not reveal the existence these characters.
Note:
The only way to reveal the characters embedded in the filenames is to, for example:
# ls /etc > /tmp/tmp.txt
then
# cat -v /tmp/tmp.txt
or vi the file /tmp/tmp.txt
SIDE EFFECTS:
When using regexp's, or utilities like sed, when these file names are used the utilities will fail, because these characters are - it seems - interfering.
I don't know how this happened?
Any guesses?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2009 01:21 PM
тАО05-12-2009 01:21 PM
Re: non printable characters in all filenames
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2009 01:58 PM
тАО05-12-2009 01:58 PM
Re: non printable characters in all filenames
For example:
# cd /etc
# ls -ld host* > /tmp/files
# cat -e /tmp/files
-rw-r--r-- 1 root root 17 Jul 23 2000 host.conf$
-rw-r--r-- 1 root root 201 Aug 17 2007 hosts$
-rw-r--r-- 1 root root 160 Aug 26 2008 hosts.allow$
-rw-r--r-- 1 root root 346 Aug 26 2008 hosts.deny$
# ls -ld --color=always host* > /tmp/files
# cat -e /tmp/files
^[[00m-rw-r--r-- 1 root root 17 Jul 23 2000 ^[[00mhost.conf^[[00m$
-rw-r--r-- 1 root root 201 Aug 17 2007 ^[[00mhosts^[[00m$
-rw-r--r-- 1 root root 160 Aug 26 2008 ^[[00mhosts.allow^[[00m$
-rw-r--r-- 1 root root 346 Aug 26 2008 ^[[00mhosts.deny^[[00m$
And I don't think that should mess with your regular expressions.
Don't forget to assing points.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2009 02:09 PM
тАО05-12-2009 02:09 PM
Re: non printable characters in all filenames
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2009 03:28 PM
тАО05-12-2009 03:28 PM
Re: non printable characters in all filenames
You have to wonder what would have gotten
more than half credit.
> [...] files [...] have unprintable
> characters prepended and appended to the
> file names.
More precisely, names is "ls" output have
[...]. The problem is with "ls", not with
the file names themselves.
As usual, it would be helpful if you
described your environment in more detail.
In this case, what your terminal is would be
interesting. Also, what your TERM variable
is. If your stuff is configured properly,
then "ls" should not be sending the color
code strings to a terminal which doesn't
know how to interpret them.
> When using regexp's, or utilities like sed,
> when these file names are used the
> utilities will fail, because these
> characters are - it seems - interfering.
"it seems"? Did you try it? Do you run "ls"
output into sed? Does "ls" add the color
info when its output is not sent to the
user's terminal?