How to run crobjob to create directory on desktop

I tried command like * * * * * mkdir new /home/subir/Desktop But it create "new" directory in my home directory. How to do that On desktop?

2

1 Answer

The syntax of mkdir is simple. From man mkdir :

 mkdir [OPTION]... DIRECTORY...

Thus the correct use is mkdir /home/subir/Desktop/new, not mkdir directory /path.

When you specify multiple arguments, and none of them are options, mkdir will threat them as seperate directories to make. Thus, it tried to make new and /home/subir/Desktop.

You should probably learn to use man pages to figure out such things quickly yourself.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like