LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices


Reply
  Search this Thread
Old 04-13-2018, 10:29 AM   #1
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Rep: Reputation: Disabled
cp help in hpux


Hi,

I have one hpux server in production.Details of same is as below.

#uname -a
HP-UX SrvrName B.11.31 U ia64 2915055790 unlimited-user license


I need to copy multiple folders from one filesystem to another with their permissions recursively.I am using below command for the same.

cp -rp abc /some/destination/abc

I noticed there is slight change in nummber of bytes


Source folder bytes:

#du -sk abc
6627293 abc

Destination folder bytes:
#du -sk /some/destination/abc
6626974 /some/destination/abc


I have tried on multiple folders but got same issue.

Is above command correct?.If it is why there is difference in bytes?

If it is notcorrect,then pls suggest a command to copy all folders files including hidden files and permissions in hpux

I have read multiple articles on internet but failed to get any relevant sollution.Please help
 
Old 04-13-2018, 12:25 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
There can be less space used by some of the directory files. When files are added to a directory, the directory expands to hold the added names, but a directory never shrinks. When files are removed, the space used by that name=>inode mapping is marked free, but continues to occupy space on the disk. When you copy that directory to a new location, the new directory will be only large enough to hold its current contents.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Syslog in HPUX Ankushkalra Other *NIX 3 02-13-2017 02:50 AM
Makefile in HPUX 11.11 vishwanathmadalgi Linux - Newbie 1 01-08-2013 04:01 AM
migration from HPUX to Linux ashish.dubey Linux - Newbie 3 10-16-2008 07:16 PM
Mutt for HPUX samash Other *NIX 2 03-25-2008 07:56 AM
Apache 2.0.59 aborted on HPUX 11.23 IA patilvidya Other *NIX 0 04-19-2007 08:29 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration