Telnet and file Copy/Delete Problem

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Telnet and file Copy/Delete Problem
# 1  
Old 01-10-2002
Computer Telnet and file Copy/Delete Problem

Hi there....I'm new for the UNIX...

just wondering if there is any method that can telnet to a server without typing the userID and PWD each time...
that is any command or scripts that allows me to enter the server directly?

also...after i enter the server...
i want to get some files then remove them...
how's that can be done?

thanks if anyone can give some help~~!!

# 2  
Old 01-10-2002
Why do u want to telnet to another server if you wish to get/delete some files? use ftp instead.

Here's a clue: $HOME/.netrc. See the man pages on netrc. This will help you in your desired task.

You would also like to see the man pages of rsh
# 3  
Old 01-10-2002
I agree with Shaik. Just to add, if you still want to login to a remote M/C without using a password, then you can use rlogin.
But in that case all you need to do is create a .hosts file in the remote M/C and put your login name there.
But this is a security risk.

lemme tell you that .netrc doesnt takes encryted passwords and its a normal text file. So, anyone can see your password. So, select your priorities accordingly.
# 4  
Old 01-10-2002
i create a file ".netrc" in my user/bin/
says the netrc file have this:

machine apple login lemon password orange

when i try to ftp apple
it will require for login and password...anything i did wrong?
# 5  
Old 01-10-2002
Here's a sample $HOME/.netrc file:
             machine other_host
             login user123
             password password123
             macdef init
                          mget /users/shaik/*.c
                          mdel /users/shaik/*.c

Note the blank line at the end of .netrc
Also, the permissions of this file should be set to 600
# 6  
Old 01-10-2002
My Macro part doesn't work...
if i typed pwd
i will get


so i put this in the .netrc file
mget /usr/biglemon/*
mdel /usr/biglemon/*

i thought this would get all the files from the /usr/biglemon
to my current dir...
but nothing happen....
just wondering why...

Thank you....

Last edited by biglemon; 01-10-2002 at 03:45 AM..
# 7  
Old 01-10-2002
You missed the init after your macdef. Should be like:

macdef init

Hope this works out! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem while displaying(cat) file content inside telnet loop .

Hi Team, Not getting the file output inside my email which i am sending from unix box. . Please refer the below code : #!/bin/sh { sleep 5 echo ehlo sleep 3 echo mail from: oraairtel@CNDBMUREAPZP02.localdomain sleep 3 echo rcpt to: (1 Reply)
Discussion started by: tripathi1990
1 Replies

2. UNIX for Advanced & Expert Users

File copy problem?

Hi All I can't get my head around a problem I have with a control file. The file is to control a "Listener" of sorts that listens on a named pipe. A script kicks off the listener in the background and passes it a control file. In the file it sets the Status field to pending. It then waits... (3 Replies)
Discussion started by: steadyonabix
3 Replies

3. Solaris

I can't copy any file to any machine | abort problem | freezing

I want to copy tar file to another machine. tar size is 4gb. Firstly I tried copy to windows machine with ftp client but copy operation didn't start. Now I have tryied to copy to solaris machine command with scp but copy was freezed. Picture is attached.... (1 Reply)
Discussion started by: getrue
1 Replies

4. Shell Programming and Scripting

copy, then delete lines in file with sed using a pattern

I need to copy lines to a new file from files with sed using a pattern in char postions 1-3. Then after the copy, I need to delete those same lines from the input files. For example, string "ABC" in pos 1-3 (6 Replies)
Discussion started by: laksjfhoius9123
6 Replies

5. Shell Programming and Scripting

Shell script for searching a record,copy to a file and then delete it

Hi, I have a requirement in hand: I have a file with millions of records say file 1.I have another file, say file 2 which has 2000 records in it. The requirement is to read file2 , and remove the read record from file 1 and move i to a seperate file, file 3. For eg: Read file 2, get the... (5 Replies)
Discussion started by: kumara2010
5 Replies

6. Shell Programming and Scripting

Bash Copy-Move file problem

Hello, I made a script to copy files from one directory to another and move file after the copy is done. When files are present in the source directory there is no problem but when no file are present I'm getting an error. Please help !! --------------------- #!/bin/bash ... (2 Replies)
Discussion started by: lsimoneau
2 Replies

7. Shell Programming and Scripting

Copy files listed in a text file - whitespace problem.

Hi, Say I have this text file <copy.out> that contains a list of files/directories to be copied out to a different location. $ more copy.out dir1/file1 dir1/file2 dir1/file3 "dir1/white space" dir1/file4 If I do the following: $copy=`more copy.out` $echo $copy dir1/file1... (4 Replies)
Discussion started by: 60doses
4 Replies

8. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

9. Solaris

Delete and copy file(s) slowly(!?)

Hi all! I have to monitor space in V890 machine, Solaris 10 weekly, because there is Oracle DB on it with many datafiles which have been taken offline to make enough size. Sometime, one or more datafiles are big, they are 20GB, 40GB etc.. The problem I have encountered is the processing of... (5 Replies)
Discussion started by: trantuananh24hg
5 Replies

10. UNIX for Dummies Questions & Answers

copy files from local drive to telnet unix machine.

i want to run some solaris executable program (text file). i telnet to solaris machine. the text file is on the net drive h: or my local drive on windows system. how can i copy the text file from local drive in windows to remote machine in solaris system? thanks. (4 Replies)
Discussion started by: gary
4 Replies
Login or Register to Ask a Question