- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Delete 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
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-31-2003 01:43 AM
12-31-2003 01:43 AM
file123
file124
How can I remove a file, without a filename?
Thanks
Mark
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 01:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 01:51 AM
12-31-2003 01:51 AM
Re: Delete a file
note down inode no.
then
find . -num inode_no -exec rm -fr {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 02:26 AM
12-31-2003 02:26 AM
Re: Delete a file
Wasnt sure about using the find then rm options, since I read what -rf does.
Can you remove the file using the id number?
Thanks
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 02:34 AM
12-31-2003 02:34 AM
Re: Delete a file
as RAC says, use the inode number for removing the file. The inode number is the number appearing left of the filename when executing ls -bi. It should be enough if you just do this:
# cd to the right directory
# find . -inum
which will remove the file having
It is important to be in the right directory as the inode numbers are only unique within each filesystem!
but it is perhaps a good idea to touch another file (with a name) and practice on that first.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 02:35 AM
12-31-2003 02:35 AM
Re: Delete a file
You need the file name
HTH
Ste
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 02:36 AM
12-31-2003 02:36 AM
Re: Delete a file
Another option is to use the interactive version of rm:
rm -i *a123
That will prompt you for a y/n for each file matching the pattern. As soon as you see your file, answer y to delete it and then you can ctrl-c (or whatever your INTR is set to) to end the rm command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 03:23 AM
12-31-2003 03:23 AM
Re: Delete a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2003 04:35 AM
12-31-2003 04:35 AM
Re: Delete a file
ls > list.txt
then vi list.txt and remove all lines except of your 'blank' filename, then
rm `cat list.txt`