- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Overwriting Directory 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
09-30-2004 02:23 AM
09-30-2004 02:23 AM
Overwriting Directory file
Hi People!
I have the following situation:
drwxr-xr-x 2 bmpadmb bmpb 8192 AFL521 (corrupt)
drwxrwxrwx 6 bmpadmb bmpb 96 NEW_DIR
What happens if I do:
cat NEW_DIR > AFL521
The intention here is to replace the directory file that's corrupted by a new, fresh one, and let a later fsck recover the possible lost file chunks.
Thanks already!
Alexandre.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 02:47 AM
09-30-2004 02:47 AM
Re: Overwriting Directory file
Come on guys!
Isn't that dificult, is it?
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 03:04 AM
09-30-2004 03:04 AM
Re: Overwriting Directory file
Could you be a bit more specific, you can not cat a directory.
Would you like a copy of NEW_DIR replace AFL521 ?
regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 03:07 AM
09-30-2004 03:07 AM
Re: Overwriting Directory file
cat NEW_DIR > AFL521 will prompt error first.
Try as,
cat NEW_DIR/* > AFL521/newfile
so that all files in NEW_DIR/ directory will be stored in AFL521/newfile there.
We can use cat command on file(s) only not in directory there.
If you want to send all files ( or copy ) then use as,
cp -R NEW_DIR/* AFL521/.
or
mv -R NEW_DIR/* AFL521/.
It will work there.
drwxr-xr-x 2 bmpadmb bmpb 8192 AFL521 (corrupt) means??
what happened to that directory? can you do as,
ls -l AFL521 getting response?
cd AFL521 ?
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 05:44 AM
09-30-2004 05:44 AM
Re: Overwriting Directory file
I can cd to the directory. But when I do a ls -l it complains about a file not existing.
I did a 'strings AFL521' and I've saw a lot of strange file names (file names of windows files). It seems that someone sent a windows directory and its contents, but something went wrong and the directory get corrupt.
I don't if make my self clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 05:48 AM
09-30-2004 05:48 AM
Re: Overwriting Directory file
mv AFL521 AFL521.bad
mv NEW_DIR AFL521
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 05:54 AM
09-30-2004 05:54 AM
Re: Overwriting Directory file
Yep, I've mv to other name, and it changed. But continue do to get error. The problem is with the contents of the directory. Aparently it contains a pointer to a file that actualy do not exist.
This way I cannot remove the file, because it don't exist, and cannot remove the whole directory either, because it not empty!
Tricky isn't it? :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 05:57 AM
09-30-2004 05:57 AM
Re: Overwriting Directory file
The recovered files will go to the
directory lost+found at the top level of
the filesystem. You will then have to figure
out where they go and what their names were,
because the filenames will be lost (I think
they are stored in the containing directory).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2004 06:08 AM
09-30-2004 06:08 AM
Re: Overwriting Directory file
Well, I'm almost resigned... :(
There's no other command like fsck that can run on a mounted filesystem?