LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mv error (https://www.linuxquestions.org/questions/linux-newbie-8/mv-error-819951/)

brinesharks 07-15-2010 07:11 AM

mv error
 
I'm trying to move font files (.ttf and .otf) from the download folder to a folder Inkscape can find them in. I tried dragging and dropping them in Dolphin but I don't have permission! So tried in the terminal:

Code:

~$ mv ~/downloads/fonts/*.*tf /usr/share/fonts
mv: cannot stat `/home/bryan/downloads/fonts/*.*tf': No such file or directory

As far as I can tell the directories exist. Any tips?

hendriko 07-15-2010 07:19 AM

If you can't drop and drop with Dolphin, the mv shouldn't work either. Since you say you don't have permission, then try the mv with sudo. Try 'sudo mv ~/downloads...'.

shimonl 07-15-2010 07:20 AM

I am still pretty new, but have gotten used to a few good tools.
What I would do in your case is to open mc (midnight commander)
as root, and let it move them. Obviously, root can do anything, right?

The question remains, why were you denied access? Were the files
built with the wrong owner? If you need to, mc can change owner and group.

Hmm.. maybe the access you were denied was to /usr/shar/fonts ?
(I could not tell from your post if the problem was source or target)
In that case mc as root will get the files where you want them.

Good luck!

brinesharks 07-15-2010 07:29 AM

Thanks for the super fast replies. It looks like I can't paste the files into the /usr/share/fonts directory.

Kubuntu doesn't let you log in as root and I only know how to switch in the console. Even when I do, it still gives me the same error.

~$ sudo mv ~/downloads/fonts/*.ttf /usr/share/fonts
[sudo] password for bryan:
mv: cannot stat `/home/bryan/downloads/fonts/*.ttf': No such file or directory

Starting to get frustrating - I'm working on something I need to get done tonight and off to the printers in the morning...

linuxlover.chaitanya 07-15-2010 07:31 AM

@Above.

The destination is not accessible as a normal user. And you can see that OP is trying to move as a normal user. Look at the prompt.

su - should make you root temporarily.
And as you are using Ubuntu, you can use sudo.

OP got here faster.
It seems the error is caused by the wild card interpretation. Can you try copying a single file at a time using sudo?

alli_yas 07-15-2010 07:47 AM

Can you post the output of:

Code:

$ls -la /home/bryan/downloads/fonts
and

Code:

$id
I have simulated your problem on my Ubuntu Lucid VM and your command with sudo works perfectly:

Code:

$sudo mv ~/downloads/fonts/*.*tf /usr/share/fonts
@Chaitanya - think the OP's wild card will work - have tested it and it does seem to work. I suspect the source directory is incorrectly specified.

alli_yas 07-15-2010 07:53 AM

Hi

I managed to reproduce your error. It happens when you try to move the font files that have already been moved to /usr/share/fonts - hence the No such file or directory error

Try doing:

Code:

$ls /usr/share/fonts
And verify whether the files are there or not.

pixellany 07-15-2010 07:55 AM

I put your command into code tags so that we can see that there is a space between the source and target (good thing).

<<Sorry--this had an error>>

Code:

[mherring@Ath ~]$ cd play
[mherring@Ath play]$ ls
fonts
[mherring@Ath play]$ ls fonts
[mherring@Ath play]$ touch file1.ttf
[mherring@Ath play]$ touch file2.otf
[mherring@Ath play]$ mv ~/play/*.*tf fonts
[mherring@Ath play]$ ls fonts
file1.ttf  file2.otf
[mherring@Ath play]$

Now working as expected.

brinesharks 07-15-2010 07:59 AM

Quote:

Originally Posted by alli_yas (Post 4033891)
Hi

I managed to reproduce your error. It happens when you try to move the font files that have already been moved to /usr/share/fonts - hence the No such file or directory error

Try doing:

Code:

$ls /usr/share/fonts
And verify whether the files are there or not.

Thanks for going to all this effort to help. here's the result - works fine:

~$ ls /usr/share/fonts
truetype type1 X11

They are the folders I expected in there.

brinesharks 07-15-2010 08:03 AM

Quote:

Originally Posted by alli_yas (Post 4033890)
Can you post the output of:

Code:

$ls -la /home/bryan/downloads/fonts
and

Code:

$id
I have simulated your problem on my Ubuntu Lucid VM and your command with sudo works perfectly:

Code:

$sudo mv ~/downloads/fonts/*.*tf /usr/share/fonts

Here is the result:

Code:

~$ ls -la /home/bryan/downloads/fonts
ls: cannot access /home/bryan/downloads/fonts: No such file or directory
bryan@OfficeE8400:~$ id
uid=1000(bryan) gid=1000(bryan) groups=0(root),4(adm),20(dialout),21(fax),24(cdrom),25(floppy),27(sudo),46(plugdev),103(syslog),105(lpadmin),115(admin),116(sambashare),1000(bryan)


pixellany 07-15-2010 08:07 AM

my post above had a fatal error---I edited with another test.

alli_yas 07-15-2010 08:07 AM

Quote:

~$ ls -la /home/bryan/downloads/fonts
ls: cannot access /home/bryan/downloads/fonts: No such file or directory
Here's your problem right here. The first argument in your mv command is the source files/directories to move(in your case /home/bryan/downloads/fonts/*.*tf).

Now based on the above ls command - you see that your source directory/files don't exist.

Do you know where on the filesystem your font files are located?

brinesharks 07-16-2010 07:04 AM

Quote:

Originally Posted by alli_yas (Post 4033907)
Here's your problem right here. The first argument in your mv command is the source files/directories to move(in your case /home/bryan/downloads/fonts/*.*tf).

Now based on the above ls command - you see that your source directory/files don't exist.

Do you know where on the filesystem your font files are located?


I understand what you are saying but I don't understand why its says it doesn't exist:

Code:

~$ ls -la /home/bryan
total 2076
drwxr-xr-x 55 bryan bryan    4096 2010-07-16 21:14 .
drwxr-xr-x  5 root  root    4096 2010-07-15 22:16 ..
drwx------  3 bryan bryan    4096 2010-05-10 00:30 .adobe
-rw-r--r--  1 bryan bryan    308 2010-06-19 23:20 agreement.cgi?dlfile=http:%2F%2Fwww.brother.com%2Fpub%2Fbsc%2Flinux%2Fdlf%2Fmfc790cwlpr-1.1.2-2.i386.deb&lang=English_lpr
...
drwxr-xr-x  4 bryan bryan    4096 2010-07-15 21:29 Downloads
...

And it just occurred to me - the command line is case sensitive...:o I wish I had realised that at midnight last night before I wasted everyone's time...:newbie:

alli_yas 07-16-2010 07:21 AM

Code:

drwxr-xr-x  4 bryan bryan    4096 2010-07-15 21:29 Downloads
As you rightly say; Linux is case sensitive. Remember its not just the terminal; in general; Linux is case sensitive.

Did altering the case of the Downloads do the trick? A convention I generally try to follow to prevent case issues; is to name directories in all lower case; unless there's a specific reason not to do so.

brinesharks 07-18-2010 06:34 AM

Quote:

Originally Posted by alli_yas (Post 4035216)
Code:

drwxr-xr-x  4 bryan bryan    4096 2010-07-15 21:29 Downloads
As you rightly say; Linux is case sensitive. Remember its not just the terminal; in general; Linux is case sensitive.

Did altering the case of the Downloads do the trick? A convention I generally try to follow to prevent case issues; is to name directories in all lower case; unless there's a specific reason not to do so.

The 'Downloads' directory is named like that by Kubuntu. I notice a few directories are. I think I might have created the 'Fonts' directory and made it worse! Altering the case did fix it - I transferred the files and they seem to work. Although one had a .otf rather than .ttf extension which Inkscape doesn't seem to recognise.

Thanks for all your help.

shimonl 07-18-2010 11:25 PM

This is just another example of where using a commander format, or a GUI tool,
makes things much easier. When you just click on a name, or drag to it, you can't spell it wrong, can you? ;-)
Glad to hear things worked out!

brinesharks 07-20-2010 12:53 AM

Quote:

Originally Posted by shimonl (Post 4037661)
This is just another example of where using a commander format, or a GUI tool,
makes things much easier. When you just click on a name, or drag to it, you can't spell it wrong, can you? ;-)
Glad to hear things worked out!

Absolutely - I'm glad another Linux has said this! Having to delve into the command line makes things much less enjoyable. Expecting noobs to learn it is unreasonable considering this machine is now my family machine. I don't have time to act as the system administrator.

On this particular problem, Dolphin just said that access was denied. I didn't know how to change permissions/user in Dolphin.

linuxlover.chaitanya 07-20-2010 02:12 AM

The Linux in general is just case sensitive. That is not too much to ask for. And if you really do not remember names always, you can always use the double tab and it will show you all the files and folders in that particular location.


All times are GMT -5. The time now is 01:15 AM.