LinuxQuestions.org
Visit Jeremy's Blog.
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-30-2005, 05:55 AM   #1
namit
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 355

Rep: Reputation: 30
Copy all from smb drive


I want a program where i can copy all my files from my smb directory to my linux directory i am linking up ok and can see my files on the linux drive and the windows machine.

So now i am looking for an equivalent of xcopy where i can copy everything in one directory to another directory.

I have a batch files that does it from my windows computer to my linux computer but now just want to know how do i do it form windows to linux.

Anyone know?
 
Old 10-30-2005, 10:18 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: Copy all from smb drive

Quote:
Originally posted by namit
I want a program where i can copy all my files from my smb directory to my linux directory i am linking up ok and can see my files on the linux drive and the windows machine.

So now i am looking for an equivalent of xcopy where i can copy everything in one directory to another directory.

I have a batch files that does it from my windows computer to my linux computer but now just want to know how do i do it form windows to linux.

Anyone know?
Write a really simple bash script.. and name it copydir

Code:
#!/bin/bash

cp -r /source/directory /desination/directory
chmod +x copydir <- to make it executable

./copydir <- to run it
 
Old 10-31-2005, 10:19 AM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
rsync would be another option.
 
Old 10-31-2005, 10:30 AM   #4
pritchardtom
Member
 
Registered: Oct 2005
Location: Swansea, UK
Distribution: Slackware // Mandriva
Posts: 32

Rep: Reputation: 15
As mentioned above, just use

"cp -r /source/directory /desination/directory"

I don't think you will need to actually write a bash script, you could just set an alias for everytime you want to do it.

However, it has been my experience that you will have to su to root in order to copy files from Windows, this may just be system dependent and may be different with each distro.
 
  


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
CUPS over SMB only printing one copy MikeBest Linux - Software 8 05-21-2010 03:08 AM
Easiest way to copy a boot drive to a new hard drive lsgko Linux - Software 3 05-24-2005 09:38 PM
How to copy ext2fs from failed hard drive to good drive? DogWalker Linux - Hardware 2 08-30-2004 10:52 PM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM
Cannot Copy Files From Network FAT32/NTFS Drive to My Local Linux Drive michaelh Linux - Networking 3 10-29-2002 10:27 AM

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

All times are GMT -5. The time now is 08:38 PM.

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