LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2019, 09:15 AM   #1
klswacha
LQ Newbie
 
Registered: Oct 2007
Location: Devon, UK
Distribution: Mate ubuntu
Posts: 2

Rep: Reputation: 0
Copying error- not a directory


I am running Ubuntu 19.04 (Mate). I want to copy the directory /usr/lib/rstudio onto my usb stick.

"lsusb" shows the USB as "Device 006".

"sudo fdisk -l" shows 2 entries.

"Disk /dev/sdb: 3.7Gib 4003463168 bytes 7819264 sectors
...Disk label type: gpt

Device Start End Sectors Size Type
/dev/sdb1 2048 7817215 7815168 3.7G Linux filesystem"


If I run "sudo cp -r /lib/rstudio /dev/sdb1 "
I get the error message "cannot overwrite non-directory /dev/sdb1..."
the same error message for /dev/sdb
 
Old 10-27-2019, 09:27 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
/dev/sdb1 is a block device

you need to copy the directory to its mountpoint
assuming it is mounted !


Code:
df -h
or
Code:
lsblk
 
2 members found this post helpful.
Old 10-27-2019, 10:00 AM   #3
klswacha
LQ Newbie
 
Registered: Oct 2007
Location: Devon, UK
Distribution: Mate ubuntu
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you, that solved the problem. It has now copied.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Copying the files inside a folder, without copying the folder (hopefully easy) tibberous Linux - Software 3 12-23-2010 01:50 AM
Difference after copying large directory to a new directory mazhar07 Linux - Server 4 04-04-2010 02:46 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
Copying a Directory into Another Directory with Subdirectories oadvantage Linux - Newbie 4 03-06-2006 05:27 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration