- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem removing a file
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
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
12-05-2003 01:33 AM
12-05-2003 01:33 AM
I have a file (apparently) on my system which I ftp'd to it but I cannot chown, remove, move, perform a file type on it.
Can anyone explained ?
Jeff
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:35 AM
12-05-2003 01:35 AM
Re: Problem removing a file
can you ls the directory on post the output.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:35 AM
12-05-2003 01:35 AM
Re: Problem removing a file
can you ll -d the file.
What message do you get
try ll -d file|od -c
to look for odd characters in name
Maybe it is open
Get lsof from public domain
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:35 AM
12-05-2003 01:35 AM
Re: Problem removing a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:35 AM
12-05-2003 01:35 AM
Re: Problem removing a file
Did you drop it into an NFS'd file system?
-Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:36 AM
12-05-2003 01:36 AM
Re: Problem removing a file
-rw-rw-r-- 1 root sys 153 Dec 5 14:18 EGRR.dat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:37 AM
12-05-2003 01:37 AM
Re: Problem removing a file
If you are logged in as root, then the file may not be named what you think it is. There may be some special (non-printable) characters in the file name that you are not seeing.
Do an 'ls -b' in the directory you think the file is in. The '-b' option will print octal values (like /057) for non-printable characters in the file name. So if you see something like that, you have a file name issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:37 AM
12-05-2003 01:37 AM
Re: Problem removing a file
# chmod 700 file_name*
# rm -i file_name*
# file file_name*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:38 AM
12-05-2003 01:38 AM
Solutiontry "ls > tempfile" and then vi the result. You should see all the funny characters. Edit out all the other filenames and insert "rm " in from of the funny one. Then "sh testfile".
Alternatively, "rm -i *" and answer "n" to everything except the dodgy one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:40 AM
12-05-2003 01:40 AM
Re: Problem removing a file
find the inum above
# find . -inum xxxx -exec mv {} tempfile \;
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:45 AM
12-05-2003 01:45 AM
Re: Problem removing a file
Many thanks for all this useful info.
I ended up doing the simplest option and did rm -i an answering yes to the dodgy one.
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 01:47 AM
12-05-2003 01:47 AM
Re: Problem removing a file
The filename probably has a control character or two in it and that could be the reason you are unable to do anything with it. do a ll >some_file_name and vi this file. If there are control character with the file name you should see it over there.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 02:23 AM
12-05-2003 02:23 AM
Re: Problem removing a file
type rm ./filename then hit esc 2x to expand the filename this sometimes works.
I used to knwo a way to show the control characters, but forgot the method.
also, you cna do ll -i and remove based upon the Inode value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 03:46 AM
12-05-2003 03:46 AM
Re: Problem removing a file
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2003 08:44 AM
12-05-2003 08:44 AM
Re: Problem removing a file
ls -l | cat -v
if your file is like testxxxx
where xxx are control chars,
mv test* testit
that will clear the bad characters -
if the filename is blank, then you may want to check the control chars -
lets say they are like ^C^C^C -
just move it or delete it with
mv "^C^C*" test.file
then check the contents, rename it to what you want, or delete it...
good luck