You are not logged in.

#1 2021-09-21 13:21:56

nahush
Member
Registered: 2019-01-18
Posts: 170

not able to copy file from /home/user/books to /usr/local/share/backgr

hello
i know this is really silly question to ask but from last two hours i am try to copy a jpg file from books directory to usr/local/share/background . i tried with thunar but its showing nothing in the destination folder.also cp command in terminal gives me error as "cannot stat the source directory .  any help would be appreciated. with thunar or with terminal.

source = /home/user/Books/back.jpg

destination = /usr/local/share/backgrounds/

Offline

#2 2021-09-21 13:34:51

SimonJ
Member
From: Spain
Registered: 2021-05-11
Posts: 354
Website

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

Does it exist, it does not on my system here

[simon@ga78lmtusb3r2 ~]$ ls -lah  /usr/local/share/backgrounds
ls: cannot access '/usr/local/share/backgrounds': No such file or directory


[simon@ga78lmtusb3r2 ~]$ ls -lah  /usr/local/share/
total 8,0K
drwxr-xr-x  2 root root 4,0K jun  1 22:22 .
drwxr-xr-x 11 root root 4,0K feb  3  2021 ..
lrwxrwxrwx  1 root root    6 may 31 02:39 man -> ../man

Last edited by SimonJ (2021-09-21 13:35:18)


Rlu: 222126

Offline

#3 2021-09-21 14:25:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,268

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

cannot stat the source directory

stat /home
stat /home/user
stat /home/user/Books
stat /home/user/Books/back.jpg

Chances are that there's no "/home/user" because your username isn't "user".

Offline

#4 2021-09-21 14:58:08

nahush
Member
Registered: 2019-01-18
Posts: 170

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

SimonJ wrote:

Does it exist, it does not on my system here

[simon@ga78lmtusb3r2 ~]$ ls -lah  /usr/local/share/backgrounds
ls: cannot access '/usr/local/share/backgrounds': No such file or directory


[simon@ga78lmtusb3r2 ~]$ ls -lah  /usr/local/share/
total 8,0K
drwxr-xr-x  2 root root 4,0K jun  1 22:22 .
drwxr-xr-x 11 root root 4,0K feb  3  2021 ..
lrwxrwxrwx  1 root root    6 may 31 02:39 man -> ../man

it doesnt exist in already , i have created it

and when i tried with the command with -r and with the whole directory holding the file it did copy it , dont know how?

Offline

#5 2021-09-21 15:01:02

nahush
Member
Registered: 2019-01-18
Posts: 170

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

seth wrote:

cannot stat the source directory

stat /home
stat /home/user
stat /home/user/Books
stat /home/user/Books/back.jpg

Chances are that there's no "/home/user" because your username isn't "user".

actually the error was cannot stat :/home/musicarch/books/ardou.png


but after doing the command with -r with the whole directory which containing the file it get copied with sudo command as well.

doesnt know how it happen though.

Offline

#6 2021-09-21 15:01:40

nahush
Member
Registered: 2019-01-18
Posts: 170

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

thank you all for replying

Offline

#7 2021-09-21 15:12:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: not able to copy file from /home/user/books to /usr/local/share/backgr

Please mark your thread as solved.  And for future reference, post actual commands and output all information you gave in your first posts turned out to be incorrect and misleading.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

Board footer

Powered by FluxBB