LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-07-2011, 11:12 AM   #1
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Rep: Reputation: Disabled
Unhappy Using the .netrc file


Rats! Does anyone know how to have the same machine name with two different users in an .netrc file?

i.e.,
machine sgofftp02.xxx.xxx.com
login car0071
password whatever
machine sgofftp02.xxx.xxx.com
login crp0054
password whatever

The solution to the 'get the users/passwords' out thread I started awhile back was to use the .netrc file. Only now I find THIS issue! Can you help?
 
Old 12-07-2011, 02:38 PM   #2
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Answer to a dumb question...

Due to the dead silence out here, I think this is a dumb question - how would ftp know which one to pick?? So thanks for reading...I will go about changing the ids instead!
 
Old 12-07-2011, 03:20 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
As root you can change the passwords to the users account without changing the id's. Also to get a response you have to be more detailed , as in the operating system that you're working with.
 
1 members found this post helpful.
Old 12-07-2011, 03:29 PM   #4
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Oh, sorry! This is on a Linux box - not sure how to tell what version it is? Anyway, I've been able to disable the other id for two duplicates so that solves my problem. BUT I have another question. When you do the ll command and you are on a directory of just more directories, what does the date mean?

drwxr-xr-x 3 edi harbprd 4096 May 18 2011 830
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 846
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 850
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 860

I've been told that on a FILE in a directory, the date is the last time that file was touched. Is it the same for the directory? In the above example, was May 18 2011 the last time the directory was touched or when it was created? There are no files on any of the directorys listed. And btw, why can't I find info on ll in my Linux book or just man pages?
 
Old 12-07-2011, 10:30 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Open termial & enter this command.
Quote:
uname -a
On my system it's the date that it was created or modified.

Last edited by EDDY1; 12-07-2011 at 10:47 PM.
 
1 members found this post helpful.
Old 12-08-2011, 04:06 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Code:
# This

ll

# is a very common alias for the real cmd

ls -l
which is why you can't find it; its not a 'real' cmd

To check kernel version
Code:
uname -a
To check OS version
Code:
cat /etc/*release*

The default date shown by the ls cmd is the mtime.
Quote:
Three fields in the inode structure contain the last access, change, and modification times: atime, ctime, and mtime. The atime field is updated each time the pointer to the file's data blocks is followed and the file's data is read. The mtime field is updated each time the file's data changes. The ctime field is updated each time the file's inode changes. The ctime is not creation time; there is no way under standard Unix to find a file's creation time.

Reading a file changes its atime only. Changing a file's name doesn't change atime, ctime, or mtime, because the directory entry changed (it does change the atime and mtime of the directory the file is in, though). Truncating a file doesn't change its atime (because we haven't read; we've just changed the size field in its directory entry), but it does change its ctime because we changed its size field and its mtime because we changed its contents (even though we didn't follow the pointer to do so).
courtesy of the Perl Cookbook
 
1 members found this post helpful.
Old 12-08-2011, 10:40 AM   #7
vagmztp
LQ Newbie
 
Registered: Oct 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Talking

Aha!
Linux lgofcrpshr0 2.6.18-274.3.1.el5 #1 SMP Fri Aug 26 18:49:02 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
(1310)==> cat /etc/*release*
cat: /etc/lsb-release.d: Is a directory
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Thanks so very much! I have put both in my notes so as not to forget.

SO, the date shown on my directory listing would be the last time anything occurred - for example, if a file were put on any one of those directories, then the mtime would change. Wait a sec... let me try it!

Aha!
drwxr-xr-x 3 edi harbprd 4096 Dec 8 10:38 830
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 846
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 850
drwxr-xr-x 3 edi harbprd 4096 May 18 2011 860

I'm really glad to have found this forum! Makes it much easier than simply googling whatever question I have! You are very helpful and I'm grateful.
 
Old 12-10-2011, 06:32 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
No worries, you're welcome

Now you're the expert when the next guys asks

Remember, with great power comes great responsibility
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
FTP script could not read from .netrc file rlitwez Linux - Newbie 3 10-17-2010 04:01 AM
ftp and .netrc Canis Polaris Linux - Newbie 3 11-25-2008 05:34 PM
Use of special characters in .netrc file jlarsen Linux - General 3 08-01-2007 11:12 AM
.netrc kniwor Linux - Newbie 5 12-04-2006 07:02 PM
trouble logging in to ftp with .netrc laclac01 Linux - General 1 10-27-2005 02:15 PM


All times are GMT -5. The time now is 10:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration