can't mv or cp image.xpm.gz says dir doesn't exist

Asked by dragonfly

In Xubuntu and U.S.

I was following the steps in docs/posts for using a boot splash image but I can't move or copy the image to /boot/grub : The image is in /home/user/folder name/image

I last tried to make a file for the image: "sudo mkdir /boot/grub/onesplashimage"
then move my image to it...

"sudo mv bobmarleyimage.xpm.gz /boot/grub/onesplashimage"

but terminal gave the following message :

"mv: cannot stat `bobmarleyimage.xpm.gz': No such file or directory"

related note:
This message also occured when trying to "sudo cp boot/grub/menu.lst" to a folder of my choice in /home,
the only way I could bk-up was to "sudo cp boot/grub/menu.lst boot/grub/menu.lst.old"

There are supposed to be options when moving, copying or backing-up?
(for example sudo cp -r /boot /temp should allow a whole /boot bk-up right?- didn't work either)

Sorry, I still get a little lost when reading man or info in terminal or docs- I seem to end up in various places for info and get confused...
Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#1

seems you bobmarleyimage.xpm.gz is not in you current directory

please list your current directory files:

ls -l
or
ls -l bobmarleyimage.xpm.gz

please copy your image using absolute path:

sudo mv /home/yourusername/...folder name.../bobmarleyimage.xpm.gz /boot/grub/onesplashimage

hope this helps

Revision history for this message
dragonfly (streams0dragonflies) said :
#2

Hi! I found a post with the same problem but he resolved his problem and I am still stuck! I ended up using the GUI version (Startup-Manager) and it was able to use my image from the same folder and it loaded at grub-boot time! I can't find the vertical line on my keypad, by the way, is there a keystroke combo to get it?

I cd myself to Desktop where the image folders are located and tried using the full path, then I copied the image to /home/username/ to try from another location:

I tried to mv from /home and
:/home$ cd username
:~$ sudo mv home/username/bootsplashenergia01.xpm.gz home/username/Desktop/temporaryarchives
mv: cannot stat `home/usename/bootsplashenergia01.xpm.gz': No such file or directory

it did not work from either location.
This time I was working in U. St.
Obviously I can't always cut and paste files to move them. In passing, is there a better command than cp to back-up large dir/folders like /home?
Thanks for replying quickly, there must be something I am overlooking?!

Revision history for this message
dragonfly (streams0dragonflies) said :
#3

Thanks marcobra, that solved my question.