RCP(1)

πŸ“¦ version 0.17, in debian bookworm, ubuntu jammy

πŸ’– RCP(1) β€” remote file copy πŸ’–

okay bestie, welcome to the General Commands Manual page for rcp, aka remote file copy β€” she's the OG group-chat file sender, just with more Kerberos and fewer read receipts. 🌸


✨ NAME ✨

rcp β€” remote file copy πŸ¦‹

that's it. that's the name. short, iconic, does exactly what it says on the tin.


πŸŽ€ SYNOPSIS πŸŽ€

rcp [-px] [-k realm] file1 file2
rcp [-px] [-r] [-k realm] file ... directory

two whole forms, pick your fighter ✨


πŸ’… DESCRIPTION πŸ’…

so here's the tea: rcp copies files between machines. no cap. each file or directory argument you hand her is either:

  • a remote file name shaped like rname@rhost:path, or
  • a local file name β€” which is anything with no : characters, or a / before any :s. 🫢
  • -r β€” if any of the source files are directories, rcp copies each subtree rooted at that name; in this case the destination must be a directory. it's giving "the whole folder, not just one sad little file" πŸ’€
  • -p β€” the -p option causes rcp to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the umask. by default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modified by the umask(2) on the destination host is used. πŸ‘‘
  • -k β€” the -k option requests rcp to obtain tickets for the remote host in realm realm instead of the remote host's realm as determined by krb_realmofhost(3). very "i know a guy" energy 🧚
  • -x β€” the -x option turns on DES encryption for all data passed by rcp. this may impact response time and CPU utilization, but provides increased security. secure AND slow, a true multitasker πŸ”₯

now, if path is not a full path name, it's interpreted relative to the login directory of the specified user ruser on rhost, or your current user name if no other remote user name is specified. a path on a remote host may be quoted (using \, ", or ´) so that the metacharacters are interpreted remotely. ✨

important!! rcp does not prompt for passwords. she performs remote execution via rsh(1), and requires the same authorization. no password prompt, no takebacks, that's just the vibe. πŸ’€

rcp handles third party copies, where neither source nor target files are on the current machine. main character energy honestly ⭐


πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, go say hi 🫢


🌈 HISTORY 🌈

the rcp command appeared in 4.2BSD. the version of rcp described here has been reimplemented with Kerberos in 4.3BSD-Reno. glow up era ✨


πŸ’€ BUGS πŸ’€

ngl bestie, she's not perfect:

  • Doesn't detect all cases where the target of a copy might be a file in cases where only a directory should be legal. πŸ™ˆ
  • Is confused by any output generated by commands in a .login, .profile, or .cshrc file on the remote host. 😭
  • The destination user and hostname may have to be specified as rhost.rname when the destination machine is running the 4.2BSD version of rcp.
so yes, she's got some lore-accurate flaws. read them, love them, work around them. πŸ’…

and that's the whole page, bestie!! this one came from Linux NetKit (0.17), dated August 15, 1999 β€” so go forth and copy remotely, stay encrypted, and don't forget to quote your paths. mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from