W3cubDocs

/Nushell

ucp for filesystem

Copy files using uutils/coreutils cp.

Signature

> ucp {flags} ...rest

Flags

  • --recursive, -r: copy directories recursively
  • --verbose, -v: explicitly state what is being done
  • --force, -f: if an existing destination file cannot be opened, remove it and try again (this option is ignored when the -n option is also used). currently not implemented for windows
  • --interactive, -i: ask before overwriting files
  • --progress, -p: display a progress bar
  • --no-clobber, -n: do not overwrite an existing file
  • --debug, -: explain how a file is copied. Implies -v

Parameters

  • ...rest: Copy SRC file/s to DEST

Input/output types:

input output
nothing nothing

Examples

Copy myfile to dir_b

>ucpmyfiledir_b

Recursively copy dir_a to dir_b

>ucp-rdir_adir_b

Recursively copy dir_a to dir_b, and print the feedbacks

>ucp-r-vdir_adir_b

Move many files into a directory

>ucp*.txtdir_a

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/ucp.html