Linux Mandatory arguments to long options are mandatory for short options too

Asked 2 years ago, Updated 2 years ago, 44 views

Hello, I'm a beginner at Linux. Mandatory arguments to long options are mandatory for short options too I don't understand what the sentence means Mandatory arguments seemed to be a parameter correction that should be specifically presented... Can you explain the sentence above and give me a simple example?ㅜㅠ/

linux

2022-09-22 20:04

1 Answers

When I searched the sentence as it is, there was a stack overflow article, and I guess you were looking at the cp command.

So The factor value that was essential for the long syntax option is unconditionally required for the short syntax option, which is cp for example.

Some commands don't work in this format...

cp a.txt b.txt --target-directory

If only this form was allowed...

cp a.txt b.txt --target-directory=/foo/bar

You can't use the same command like this...

cp a.txt b.txt -t

That's how it works.

cp a.txt b.txt -t=/foo/bar


2022-09-22 20:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.