Skip to main content
added 126 characters in body
Source Link
Stéphane Chazelas
  • 586.2k
  • 96
  • 1.1k
  • 1.7k

On Linux (more precisely with the GNU and busybox implementations of cp as typically found on systems that have Linux as a kernel) and recent FreeBSD, this is how:

cp -al dirA dirB 

For a more portable solution, see answer using pax and cpio by Stéphane Chazelas

On Linux and recent FreeBSD, this is how:

cp -al dirA dirB 

For a more portable solution, see answer using pax and cpio by Stéphane Chazelas

On Linux (more precisely with the GNU and busybox implementations of cp as typically found on systems that have Linux as a kernel) and recent FreeBSD, this is how:

cp -al dirA dirB 

For a more portable solution, see answer using pax and cpio by Stéphane Chazelas

add a few words on portability
Source Link
Gudmundur Orn
  • 2.2k
  • 3
  • 13
  • 9

ThisOn Linux and recent FreeBSD, this is how:

cp -al dirA dirB 

(Yes For a more portable solution, I'm answering my own question)see answer using pax and cpio by Stéphane Chazelas

This is how:

cp -al dirA dirB 

(Yes, I'm answering my own question)

On Linux and recent FreeBSD, this is how:

cp -al dirA dirB 

For a more portable solution, see answer using pax and cpio by Stéphane Chazelas

Source Link
Gudmundur Orn
  • 2.2k
  • 3
  • 13
  • 9

This is how:

cp -al dirA dirB 

(Yes, I'm answering my own question)