How to copy all files in a folder to another folder in the terminal?

I need to copy all files from **/home/antranig/downloads/fonts to *usr/share/wine/font *
**I did this command in the terminal: **
*antranig@linux-plfp:~> su
**Password: *
***linux-plfp:/home/antranig # *** *cp -r /home/antranig/downloads/fonts usr/share/wine/fonts *

**But the terminal shown this: ***cp: cannot stat ‘/home/antranig/downloads/fonts’: No such file or directory

*Please help me! How can I copy all files to another folder in the terminal?

Hi
That would indicate that the directory called font doesn’t exist?

If the fonts are required for the user, then normally copying into ~/.fonts (note the .) should suffice?

Does wine not follow the system fonts or user font locations, seems strange to copy them into the system wine directory or ~/.wine diretory?

Your command also missed a / or two…


cp -ar ~/downloads/fonts/* /usr/share/wine/fonts/

I’ll make a wild guess. You should have used “Downloads” rather than “downloads”. Filenames in linux are case-sensitive.

IMO nrickert is correct to address the immediate issue, but the User is making another couple mistakes…

Unless the console prompt is already at root, the command is missing a leading forward slash in front of “usr”

And, unless I’m mistaken, he’s also copying to the target creating a second fonts directory instead of replacing the target (which I’m pretty certain should be his intention).

So, IMO one of several <correct> ways to do this might be, and I’m using a wildcard just to illustrate it’s use)

cp -r /home/antranig/Downloads/fonts/* /usr/share/wine/fonts

The same, but without using a wildcard

cp -r /home/antranig/Downloads/fonts /usr/share/wine

HTH,
TSU

I have tried to use folder’s name with capital letter, but it doesn’t work

antranig@linux-plfp:~> su
*Password: *
linux-plfp:/home/antranig # cp -ar /home/antranig/Downloads/Fonts usr/share/wine/fonts
cp: cannot create directory ‘usr/share/wine/fonts’: No such file or directory
*linux-plfp:/home/antranig # *

Hi
Your missing the leading / in your command, it’s **/**usr/share/wine/fonts else if it doesn’t exist then create it if that’s where you want them to go;


mkdir -p /usr/share/wine/fonts

linux-plfp:/home/antranig # cp -ar /Downloads/Fonts /usr/share/wine
cp: cannot stat ‘/Downloads/Fonts’: No such file or directory
linux-plfp:/home/antranig # cp -ar /downloads/fonts /usr/share/wine
cp: cannot stat ‘/downloads/fonts’: No such file or directory
linux-plfp:/home/antranig # cp -ar /home/antranig/downloads/fonts /usr/share/wine/fonts
cp: cannot stat ‘/home/antranig/downloads/fonts’: No such file or directory



Can’t copy the folder

If it does not exist create it if it does exist check the permissions.

I have seen in the wine folder as “Show hidden folders” but there’s no “.fonts” folder.
Wine has fonts in this folder: /usr/share/wine/fonts

I want to use a QUIK program in wine, but it doesn’t show a correct fonts (like this jabberwocks ???՛՛՛՛՛;;;/՛;լլ՛ instead the normal letters). So I decided to copy fonts from Windows Fonts to /usr/share/wine/fonts

If the directory exists and the files don’t copy to it then check permissions something is off there. There are no magic directories they all follow the same rules and regulations set by the permissions.

Bro, please help me to do that. How to check, fix…?

On Fri 20 Mar 2015 12:56:01 AM CDT, andranique wrote:

gogalthorp;2700552 Wrote:
> If the directory exists and the files don’t copy to it then check
> permissions something is off there. There are no magic directories
> they all follow the same rules and regulations set by the permissions.

Bro, please help me to do that. How to check, fix…?

Hi
Your not checking your commands…

Is there a folder called /usr/share/wine/fonts?


ls -la /usr/share/wine/fonts

If you get an error, THEN;


mkdir -p /usr/share/wine/fonts
cp -r /home/antranig/downloads/fonts/* /usr/share/wine/fonts/

Note the * (wildcard) and the trailing / after the target directory.
Just use the -r so it will change permissions to root:root.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.38-44-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

andranique wrote:

>
> malcolmlewis;2700529 Wrote:
>> Hi
>> Your missing the leading / in your command, it’s */*usr/share/wine/fonts
>> else if it doesn’t exist then create it if that’s where you want them to
>> go;
>> >
> Code:
> --------------------
> > >
> > mkdir -p /usr/share/wine/fonts
> >
> --------------------
>> >
>
>
>
> Code:
> --------------------
> linux-plfp:/home/antranig # cp -ar /home/antranig/downloads/fonts
> /usr/share/wine/fonts
> cp: cannot stat ‘/home/antranig/downloads/fonts’: No such file or
> directory
>
>
>
> --------------------
>
>
> Can’t copy the folder
>
>
Try /home/antranig/Downloads/fonts
note the capital D

Right. And this has already been posted by nrickert in comment#3.

And according to everything else that’s been posted here already, I would guess the exact command should be this:

cp -r /home/antranig/Downloads/fonts/* /usr/share/wine/fonts

Which already has been suggested by tsu2 in comment#4, btw…:sarcastic:

If that doesn’t work, it might be a good idea if you posted the contents of your downloads (or Downloads) folder and the exact name of that folder:

ls -ld /home/antranig/[dD]ownloads/
ls -l /home/antranig/[dD]ownloads/

On 03/19/2015 05:26 PM, gogalthorp wrote:
>
> If it does not exist create it if it does exist check the permissions.
>
>

The error indicates that the source does not exist.

Ken

The errors generated with these tries indicates that the problem is with your source location, not target destination.

You probably have a problem with camel case (capitalizations).

To resolve:
First determine exactly how your “Fonts/fonts” (or however) is really named…

ls /home/antranig

Note how the word “fonts” is spelled with capitalizations. My guess is it’s “Fonts” with a capitalization.
Now, execute the command with the proper capitalizations, my guess is the following will work

cp -r /home/antranig/Downloads/Fonts/ /usr/share/wine

Note however that the above command will copy your fonts to a wine folder with a a Fonts folder (also capitalized) and that can be an issue if it’s not supposed to be capitalized. If you need to fix that, then the following is one way to do it… The following is a combo command that first creates your destination folder uncapitalized, then copies the contents of your existing ~/Downloads/Fonts/ folder to the destination folder just created.

mkdir /usr/share/wine/fonts && cp -r /home/antranig/Downloads/Fonts/* /usr/share/wine/fonts/

HTH,
TSU

TSU

linux-plfp:/home/antranig # ls -la /usr/share/wine/fontstotal 908
drwxr-xr-x 1 root root   1238 Mar 20 21:41 .
drwxr-xr-x 1 root root     64 Mar 20 21:41 ..
-rw-r--r-- 1 root root   4912 Mar 20 17:22 coue1255.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 coue1256.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 coue1257.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 couree.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 coure.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 coureg.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 courer.fon
-rw-r--r-- 1 root root   4912 Mar 20 17:22 couret.fon
-rw-r--r-- 1 root root  12704 Mar 20 17:22 cvgasys.fon
-rw-r--r-- 1 root root   6512 Mar 20 17:22 hvgasys.fon
-rw-r--r-- 1 root root   4480 Mar 20 17:22 jsmalle.fon
-rw-r--r-- 1 root root   6032 Mar 20 17:22 jvgafix.fon
-rw-r--r-- 1 root root   7360 Mar 20 17:22 jvgasys.fon
-rw-r--r-- 1 root root   6136 Mar 20 17:22 marlett.ttf
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smae1255.fon
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smae1256.fon
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smae1257.fon
-rw-r--r-- 1 root root   4496 Mar 20 17:22 smallee.fon
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smalle.fon
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smalleg.fon
-rw-r--r-- 1 root root   4560 Mar 20 17:22 smaller.fon
-rw-r--r-- 1 root root   4512 Mar 20 17:22 smallet.fon
-rw-r--r-- 1 root root  18640 Mar 20 17:22 ssee1255.fon
-rw-r--r-- 1 root root  18944 Mar 20 17:22 ssee1256.fon
-rw-r--r-- 1 root root  20032 Mar 20 17:22 ssee1257.fon
-rw-r--r-- 1 root root  18016 Mar 20 17:22 ssee874.fon
-rw-r--r-- 1 root root  13984 Mar 20 17:22 ssef1255.fon
-rw-r--r-- 1 root root  14288 Mar 20 17:22 ssef1256.fon
-rw-r--r-- 1 root root  15328 Mar 20 17:22 ssef1257.fon
-rw-r--r-- 1 root root  13376 Mar 20 17:22 ssef874.fon
-rw-r--r-- 1 root root  11248 Mar 20 17:22 sserifee.fon
-rw-r--r-- 1 root root  20272 Mar 20 17:22 sserife.fon
-rw-r--r-- 1 root root  20016 Mar 20 17:22 sserifeg.fon
-rw-r--r-- 1 root root  21040 Mar 20 17:22 sserifer.fon
-rw-r--r-- 1 root root  20208 Mar 20 17:22 sserifet.fon
-rw-r--r-- 1 root root   6576 Mar 20 17:22 sseriffe.fon
-rw-r--r-- 1 root root  15536 Mar 20 17:22 sseriff.fon
-rw-r--r-- 1 root root  15328 Mar 20 17:22 sseriffg.fon
-rw-r--r-- 1 root root  16144 Mar 20 17:22 sseriffr.fon
-rw-r--r-- 1 root root  15472 Mar 20 17:22 sserifft.fon
-rw-r--r-- 1 root root  12704 Mar 20 17:22 svgasys.fon
-rw-r--r-- 1 root root  26040 Mar 20 17:22 symbol.ttf
-rw-r--r-- 1 root root 137272 Mar 20 17:22 tahomabd.ttf
-rw-r--r-- 1 root root 143652 Mar 20 17:22 tahoma.ttf
-rw-r--r-- 1 root root   5360 Mar 20 17:22 vgafix.fon
-rw-r--r-- 1 root root   6448 Mar 20 17:22 vgas1255.fon
-rw-r--r-- 1 root root   6064 Mar 20 17:22 vgas1256.fon
-rw-r--r-- 1 root root   6576 Mar 20 17:22 vgas1257.fon
-rw-r--r-- 1 root root   6000 Mar 20 17:22 vgas874.fon
-rw-r--r-- 1 root root   6608 Mar 20 17:22 vgasyse.fon
-rw-r--r-- 1 root root   6512 Mar 20 17:22 vgasys.fon
-rw-r--r-- 1 root root   6576 Mar 20 17:22 vgasysg.fon
-rw-r--r-- 1 root root   6864 Mar 20 17:22 vgasysr.fon
-rw-r--r-- 1 root root   6480 Mar 20 17:22 vgasyst.fon
-rw-r--r-- 1 root root   6720 Mar 20 17:22 wingding.ttf
linux-plfp:/home/antranig # cp -r /home/antranig/downloads/fonts/* /usr/share/wine/fonts/
cp: cannot stat ‘/home/antranig/downloads/fonts/*’: No such file or directory

Does

/home/antranig/downloads/fonts/

actually exist because the error message says it does not

I think you are right

linux-plfp:/home/antranig # cp -r /home/antranig/Downloads/Fonts /usr/share/wine
linux-plfp:/home/antranig #