Mv command giving "No such file or Directory" but directory exists

I downloaded and am trying to install a Nerd Font, called Meslo, onto my system and following https://wiki.archlinux.org/title/Fonts used mkdir -p /usr/share/local/fonts which successfully created the directory and because it’s a root directory I couldn’t use Thunar to move the font into that directory so I tried to use the mv command and found various pages including the man page that says the syntax is mv [OPTIONS] SOURCE... DIRECTORY.

So the following is what I’ve tried:

  • mv /home/tc/Downloads/Meslo/ /usr/share/local/fonts/

  • mv ~/Downloads/Meslo/ /usr/share/local/fonts/

  • Adding sudo as a prefix to the above.

But none of these work. I then thought maybe I don’t have the right file permissions but using ls -l inside the directory outputs drwxr-xr-x 2 root root 4096 Jan 8 23:49 fonts which I think means there is read, write and execute rights according to https://wiki.archlinux.org/title/File_permissions_and_attributes

I have tried searching online but all the ones I could find only talk about getting this error when using the command through a script and it works when they type it out in terminal.

I am aware that I can just slap the font into ~/.local/share/fonts/ and call it a day but I want to learn why this isn’t working.

Have no idea if my desktop environment matters but I am using XFCE.

Why not using cp (copy)?
cp /home/tc/Downloads/Meslo/* /usr/share/local/fonts/

Notice the asterisk (it means: everything in that directory)

Copy the fonts where to you want them, then adjust permissions for the directory and it’s contents.

It should be the same with mv (move) - you want to move the contents of the directory, not the directory.

or:
mv /home/tc/Downloads/Meslo /usr/share/local/fonts/
(without the slash at the end of the source directory … that should move the directory “Meslo” along with it’s content)

… or what @scotty65 said

and, of course, what @Takakage just said - I totally missed that :man_facepalming:

1 Like

Why not just install the ttf-meslo-nerd font package from Manjaro’s Official Repositories (extra)? It will install the following fonts:

/usr/share/fonts/TTF/MesloLGLDZNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGLDZNerdFontPropo-Regular.ttf
/usr/share/fonts/TTF/MesloLGLNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGLNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGLNerdFontPropo-Regular.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGMDZNerdFontPropo-Regular.ttf
/usr/share/fonts/TTF/MesloLGMNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGMNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGMNerdFontPropo-Regular.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGSDZNerdFontPropo-Regular.ttf
/usr/share/fonts/TTF/MesloLGSNerdFont-Bold.ttf
/usr/share/fonts/TTF/MesloLGSNerdFont-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFont-Italic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFont-Regular.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontMono-Bold.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontMono-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontMono-Italic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontMono-Regular.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontPropo-Bold.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontPropo-BoldItalic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontPropo-Italic.ttf
/usr/share/fonts/TTF/MesloLGSNerdFontPropo-Regular.ttf
2 Likes
"/usr/share/local" != "/usr/local/share"
2 Likes

Oh :rofl: :joy:
FFS, I should of just went to sleep…

I was following reading the https://ohmyposh.dev/docs/installation/fonts and downloaded the zip from the link and figured mv it to the directory won’t be hard and will be a chance to use a command I rarely use.

Me too bud, me too…

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.