Solved

Is there any copy command is there in linux to copy logs in linux path to my windows sharing directory;

Posted on 2006-07-03
16
365 Views
Last Modified: 2010-04-20
Is there any copy command is there in linux to copy logs in linux path to my windows sharing directory;

copy /root/org/apache/jsp/*.logs  c:/sharing/
0
Comment
Question by:chaitu chaitu
  • 7
  • 6
  • 2
  • +1
16 Comments
 
LVL 24

Expert Comment

by:fridom
ID: 17035069
Well you can simply mount NTFS or FAT file systems on Linux. If you do so you can just run
cp *logs /mnt/my_windows_partion

The other option is to use Samba or NFS e.g

Regards
Friedrich
0
 
LVL 16

Expert Comment

by:xDamox
ID: 17035169
Hi,

As root type the following commands:

mkdir /mnt/share
smbmount //winpc/shared /mnt/share -o rw

Replace winpc with the IP of your windows PC

Once that is done you can copy the logs from one location to your windows share by issuing the following:

cp /root/org/apache/jsp/*.logs /mnt/share
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17035267
once i give this smbmount //XXX.XX.XX.XX/shared /mnt/share -o rw

its asking password;i have given  system password ;i am getting below message.i think permission not there to give read write permissions for sharing directory in windows

Password:

20083: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 16

Expert Comment

by:xDamox
ID: 17035421
Hi,

When it ask for a password what happends if you just hit enter?
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17035430
It is using your logged in name as your username when trying to do this. Try:

smbmount username=myname //XXX.XX.XX.XX/shared /mnt/share -o rw

in order to provide a valid username for the remote share, and then enter the matching password.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17035478
smbmount username=myusername //XXX.XX.XX.XX/shared /mnt/
share -o rw
Could not resolve mount point //XXX.XX.XX.XX/shared
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17035482
When it ask for a password what happends if you just hit enter?


Anonymous login successful
24229: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name)
SMB connection failed
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17035514
>You specified an invalid share name

In which case, the share is not valid for anonymous, or you need to change the name of the share to the correct name.

smbclient -L //XXX.XX.XX.XX

is a very useful command that enables you to see what shares are available.

Just press <enter> when asked for a password.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17035734
smbmount username=myusername ip=//xxx.xx.xx.xx/ /mnt/share -o rw

if u give or dont give any path after ipaddress its giving this message only.

Could not resolve mount point ip=//xxx.xx.xx.xx/.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17035831
Look *carefully*. Cut and paste if necessary - there is no / at the end:

smbclient -L //XXX.XX.XX.XX

If you stick a / at the end, then the command probably will try and resolve a mountpoint (and probably fail?)

(   (()
(`-' _\
 ''  ''
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17035846
smbclient -L //XXX.XX.XX.XX

is the full command  - no mount point etc. You are looking to get a list of the shares available. These will be printed to the console.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17040189
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: NT_STATUS_ACCESS_DENIED
session request to xxx.xxx.xx.xxx failed (Called name not present)----my system ipaddress printed here
session request to xxx failed (Called name not present)
Anonymous login successful
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 17040710
The anonymous version works as it should, now add the correct username:

smbclient -L username=myusername //XXX.XX.XX.XX

and enter the correct password, and you'll see the shares available to the user concerned. If the share ithat you need isn't visible, then you will need to start looking at the share permissions.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17042685
\\xxx.xx.xx.xx: Not enough '\' characters in service
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17042731
?????

The slashes go the other way.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17042789
i changed but same error
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question