I'd like to use the cp command and if it's finished it has to shutdown itself on my Mint 19.2 distribution.

I found some basics of combination but it didn't work. Maybe one of you could fix my syntax:

sudo cp -a -r [path from] [path to] && shutdown -h
New contributor
Blumi147 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    shutdown will require elevated privilieges (sudo), and may require a time (you didn't give your release; so I cannot confirm if required for your release; the time you want is 'now' most probably). – guiverc Dec 2 at 22:48
  • I know it's possible to set time variable - but not how. For sure it's possible in most GUI copy implements as known for windows (tera copy). – Blumi147 Dec 2 at 22:53
  • Linux Mint is neither Ubuntu, nor official flavor of Ubuntu, thus off-topic on this site. Refer askubuntu.com/help/on-topic for appropriate places to ask if you don't want to use a Mint forum. Use man shutdown to see the format for the command; you don't need to use any variables as it's an argument for the command; but that's not your only issue. – guiverc Dec 2 at 23:19
  • Official flavors are pretty easy to detect, Lubuntu, Xubuntu, Kubuntu, Ubuntu-MATE, Ubuntu-Budgie, Ubuntu-Studio, Ubuntu-Kylin... there is a keyword found in all of them, plus they can be downloaded from ubuntu.com/download/flavours (or Ubuntu's site itself) – guiverc Dec 2 at 23:22