LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-26-2011, 10:23 AM   #1
aimsphere
LQ Newbie
 
Registered: Jan 2011
Distribution: SuSE
Posts: 4

Rep: Reputation: 0
Unhappy Problem copying files from a remote server


Hey guys,

I have a problem while copying files from a remote computer to my local one using the scp command. I am sure that I am using it correctly, please check it below:

---
blah@blah.com:~/g4work> scp blah2@blah2.com:IndirectMethod_Spher...s/H_1.mac.root .
---

What I get in return (instead of the statement saying 100% of file copied) is:

---
On this machine the G4SYSTEM=Linux-g++
---

The interesting point is that the above returned statement is one of the Environment variables set on both the machines that are necessary to work with a toolkit called Geant4. Here is what I get when I type 'printenv | grep G4' just to show you (note the statement in bold):

---
G4LEVELGAMMADATA=/home/blah/geant4/geant4.9.3.p02/data/PhotonEvaporation2.0
G4INSTALL=/home/blah/geant4/geant4.9.3.p02
G4LEDATA=/home/blah/geant4/geant4.9.3.p02/data/G4EMLOW6.9
G4NEUTRONHPDATA=/home/blah/geant4/geant4.9.3.p02/data/G4NDL3.13
G4VIS_BUILD_OPENGLX_DRIVER=1
G4RADIOACTIVEDATA=/home/blah/geant4/geant4.9.3.p02/data/RadioactiveDecay3.2
G4ABLADATA=/home/blah/geant4/geant4.9.3.p02/data/G4ABLA3.0
G4LIB=/home/blah/geant4/geant4.9.3.p02/lib
G4VIS_BUILD_RAYTRACERX_DRIVER=1
G4LIB_BUILD_SHARED=1
G4VIS_USE_OPENGLX=1
G4UI_USE_TCSH=1
G4VIS_USE_RAYTRACERX=1
G4REALSURFACEDATA=/home/blah/geant4/geant4.9.3.p02/data/RealSurface1.0
G4SYSTEM=Linux-g++
G4WORKDIR=/home/blah/g4work
---

The other thing that I would like to mention is that these Geant4 Env. Variables are loaded each time a new (bash) shell is started as a result of the bash login script.

I would be grateful if someone could try to help me.
Thank you.

Last edited by aimsphere; 01-27-2011 at 06:00 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-26-2011, 10:31 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Maybe I am wrong here, but shouldn't it be
Code:
scp mrig_al@ME-SB140CLC:/IndirectMethod_SphereDose_04.08.2010_ExtendedPhys_TEST/mac_files/H_1.mac.root .
instead of
Code:
scp mrig_al@ME-SB140CLC:IndirectMethod_SphereDose_04.08.2010_ExtendedPhys_TEST/mac_files/H_1.mac.root .
Sidenote: Please post code in code-tags, this way your code will not be shorted to mail-addresses.
 
Old 01-26-2011, 10:48 AM   #3
aimsphere
LQ Newbie
 
Registered: Jan 2011
Distribution: SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
No, I tried it out but it gives the same statement. Thanks anyway!
 
Old 01-26-2011, 11:22 AM   #4
aimsphere
LQ Newbie
 
Registered: Jan 2011
Distribution: SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
I found that on commenting out the shell script in the bashrc file, this transfer works. But this isn't a solution, rather its a work around and impractical. I would still appreciate suggestions. Thanks!
 
Old 01-26-2011, 11:24 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Try redirecting the output of the sourced file in your .bashrc to /dev/null

Eg in your .bashrc
Code:
. /opt/geant4/setup.sh
to
Code:
. /opt/geant4/setup.sh > /dev/null 2>&1
Or perhaps only source it for interactive shells
Code:
if [ "$PS1" ] ; then
   . /opt/geant4/setup.sh
fi
Evo2.
 
2 members found this post helpful.
Old 01-27-2011, 05:51 AM   #6
aimsphere
LQ Newbie
 
Registered: Jan 2011
Distribution: SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks evo2. Your solution works perfect!This idea of dumping the unnecessary output was super. Thanks for showing me this !
 
Old 01-30-2011, 05:05 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by aimsphere View Post
Thanks evo2. Your solution works perfect!This idea of dumping the unnecessary output was super. Thanks for showing me this !
No problem. I'm also in HEP and have had similar problems. I really hate how every 2nd piece of software in particle physics seem to require sourcing some nasty scripts that pollute your environment variables.

Cheers,

Evo2.
 
  


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] scp error while copying files between two remote computers austinium Linux - Newbie 7 02-16-2014 09:27 AM
Copying bulk files from one server to another jegaraman Linux - Newbie 4 10-07-2010 08:22 AM
copying files from different servers to one server s_linux SUSE / openSUSE 1 07-29-2009 11:45 AM
copying files from remote server through ssh dave247 Debian 12 11-21-2008 09:56 AM
Copying files from the internet to my server? Fasn8n Linux - General 8 02-13-2006 01:53 PM

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

All times are GMT -5. The time now is 12:45 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