Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Linux Noob Copy Question

Featured Replies

I am new to linux and all this unraid stuff.

 

I used SNAP to mount a drive which I can access it and it seems to work.. ic an play various music files from it.

 

I want to copy files from that mounted drive to a drive in the array.

 

I am using this command but only about 11 directories copy ... I have about 300:

 

/mnt/disk/Various/music# cp -r *.*  /mnt/disk2/music

 

should I be copying this to  the music folder that is a share and not to the disk2/music ?

I am new to linux and all this unraid stuff.

 

I used SNAP to mount a drive which I can access it and it seems to work.. ic an play various music files from it.

 

I want to copy files from that mounted drive to a drive in the array.

 

I am using this command but only about 11 directories copy ... I have about 300:

 

/mnt/disk/Various/music# cp -r *.*  /mnt/disk2/music

 

should I be copying this to  the music folder that is a share and not to the disk2/music ?

This is not MS-DOS.  You do not need to specify *.*, in fact it will restrict what is copied.

 

The more correct commands would be:

cd /mnt/disk/Various/music

cp -v -r  *  /mnt/disk2/music/

 

It assumes you have enough space on disk2.  It will also terminate the copy if you log off, "-v" option will let you see what it is doing as it copies.

  • Author

i tried that and its not working!  Grrrr I tried it 3 ways... if I dod the wrong way *.* it copies those same 11 folders.... but not the hundred plus others...

 

 

root@Tower:/mnt/disk# cd Various

root@Tower:/mnt/disk/Various# cd music

root@Tower:/mnt/disk/Various/music# cp -v-r * /mnt/disk2/music/

cp: invalid option -- -

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music# cp -v -r * /mnt/disk2/music/

cp: invalid option -- e

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music# cp -v -r * /mnt/disk2/music

cp: invalid option -- e

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music#

 

i tried that and its not working!  Grrrr I tried it 3 ways... if I dod the wrong way *.* it copies those same 11 folders.... but not the hundred plus others...

 

 

root@Tower:/mnt/disk# cd Various

root@Tower:/mnt/disk/Various# cd music

root@Tower:/mnt/disk/Various/music# cp -v-r * /mnt/disk2/music/

cp: invalid option -- -

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music# cp -v -r * /mnt/disk2/music/

cp: invalid option -- e

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music# cp -v -r * /mnt/disk2/music

cp: invalid option -- e

Try `cp --help' for more information.

root@Tower:/mnt/disk/Various/music#

 

Perhaps you should show the output of

echo *

so we can see the names of the folders being expanded by the shell before being passed to the "cp" command.

 

  • Author

okay i used a dot instead of a star and it worked....

  • Author

Joe L ... thanks for your help ! This unix stuff is new to me!  Been a DOS man for ever!

Joe L ... thanks for your help ! This unix stuff is new to me!  Been a DOS man for ever!

No problem.  There's a place for everybody.  The single "." is a name that is linked to the current directory, and therefore represents the current directory.  Unix/linux has no need for the three letter extension on file names.  You basically said copy recursively the current directory  to the target disk.

 

Have fun with your new server.

Joe L.

(And I'll bet your version of MS-DOS is nearly immune to infection from almost any of today's key-loggers, Trojan horses, rootkits, and viruses)

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.