Search code examples
mvcifs

move folder and subfolders to mounted cifs share


I am trying to move the main folder (which is the date), and specific subfolders and files to a mounted cifs drive (test).

mv -v bam,bed /home/cmccabe/Desktop/NGS/API/6-10-2016 smb://smb/smbdatabay/test
mv: cannot move ‘/home/cmccabe/Desktop/NGS/API/6-10-2016’ to ‘smb://smb/smbdatabay/file’: No such file or directory

I can manually see all the folders and the share. Thank you :).

Structure of directory to move (need to move bam and bed and subfolders)

6-10-2016
bam
- file
- test
bed
id

Solution

  • The destination must be the mount point (folder without prefix smb:/). From man:

    NAME
           mv - move (rename) files
    
    SYNOPSIS
           mv [OPTION]... [-T] SOURCE DEST
           mv [OPTION]... SOURCE... DIRECTORY
           mv [OPTION]... -t DIRECTORY SOURCE...
    
    DESCRIPTION
           Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
    ...