- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Non-ascii filename
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
тАО07-08-2003 12:44 AM
тАО07-08-2003 12:44 AM
I have a file in my / directory that has a non ascii filename.
I believe it is that, that is causing long listings of / to hang.
There was 2 files, but one had the non-ascii char followed by qd so I managed to delete that one.
ls -b shows the filename to be \177
How can I delete,move or view this file?
Thanks
Luke
Solved! Go to Solution.
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2003 12:54 AM
тАО07-08-2003 12:54 AM
Re: Non-ascii filename
(note down the inode no. of file)
find . -inum "inode_no_of_file" -exec rm -fr {} \;
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2003 12:57 AM
тАО07-08-2003 12:57 AM
Solutionit's a little tricky, try with ls first
for example
ls ?
should list only those file with exaclty one char, you might use this.
Or, for rm, use
rm -i *
This will prompt you to an answer before deleting the file. You skip all of them until the one you are interested in.
or
ls -li ?
will print the inode number, then with find you can build a thing like
find / -inum #### -exec ll () \;
and after
find / -inum #### -exec rm () \;
i used () because i have not the graph :)
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2003 01:10 AM
тАО07-08-2003 01:10 AM
Re: Non-ascii filename
or you can get the inode number and use find to remove the file
ls -i to get the inode number
find . -xdev -inum inodeNum -exec rm {} \;
although i'd move the file then remove it
find . -xdev -inum inodeNum -exec mv {} newFile \;
rm newFile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2003 01:57 AM
тАО07-08-2003 01:57 AM
Re: Non-ascii filename
However, I thought it was that file that was causing my ls -l / to hang.
It wasn't.
I will start a new thread concerning this issue.
Thank you all for your help.
Luke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2003 07:36 AM
тАО07-09-2003 07:36 AM
Re: Non-ascii filename
find / -inum
If you are lucky enough to have only one single-character file/directory in /, you can:
ls -b ?
rm ?
File name generation will match non-printing characters. If the file name has a dash in it, "./" will insulate rm from trying to use the file name as options.
-dlt-