A
A
Alexey Belov2018-08-27 22:11:21
linux
Alexey Belov, 2018-08-27 22:11:21

How to copy the current folder in .sh?

I need to use the NAME variable in the file, and copy the current folder (where the script is located) to the dir for example ../clones/NAME

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2018-08-27
@Alenorze

cp ./* ../clones/NAME
will copy all the files in from the working directory (this is either where the script was run, or the directory in the last cd command)
will print an info message to each subdirectory in the working directory
and
will copy the files of the working directory and will also bypass all subdirectories and copy their contents - in general all that is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question