- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HPUX - basic cp command 11iv2
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
тАО11-03-2010 08:51 AM
тАО11-03-2010 08:51 AM
HPUX - basic cp command 11iv2
I performed an LL on a directory and noticed s subir and file...both with same name
I want to copy the file to another location..
How does the cp determine (or even the mv command) which to perform the operation on?
yea...I had to asked the question!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2010 09:05 AM
тАО11-03-2010 09:05 AM
Re: HPUX - basic cp command 11iv2
You have non-printing characters in either the file name or the directory name. You can expose them with:
# ls -lb
If you then use the inode number from:
# ls -il
...you can rename ('mv') :
# cd /path && find . -xdev -type f -inum
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2010 10:12 AM
тАО11-03-2010 10:12 AM
Re: HPUX - basic cp command 11iv2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2010 11:17 AM
тАО11-03-2010 11:17 AM
Re: HPUX - basic cp command 11iv2
you can do a:
ls | od -c
to see the two file names are different.
I use "mv -i" to fix stuff like this.
Just use 'mv -i samefile newfile' command.
Answer yes to the first, no to the second.
Now, you've got two different file names, which helps a lot.
Now do
ls | od -c
to see if you've fixed the problem already, or if samefile still has junk in it. Keep in mind that you had a 50/50 chance of fixing the issue in the previous command.
If it does, run "mv -i ./*samefile* anotherfilename"
and answer yes to your command.
At this point, you should have two different names, both clean. One a directory, one a file, fix them both like you'd like have them finally be represented.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2010 06:02 AM
тАО11-08-2010 06:02 AM