LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using the .netrc file (https://www.linuxquestions.org/questions/linux-newbie-8/using-the-netrc-file-917573/)

vagmztp 12-07-2011 10:12 AM

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?

vagmztp 12-07-2011 01:38 PM

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!

EDDY1 12-07-2011 02:20 PM

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.

vagmztp 12-07-2011 02:29 PM

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?

EDDY1 12-07-2011 09:30 PM

Open termial & enter this command.
Quote:

uname -a
On my system it's the date that it was created or modified.

chrism01 12-08-2011 03:06 AM

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 :)

vagmztp 12-08-2011 09:40 AM

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.

chrism01 12-10-2011 05:32 PM

No worries, you're welcome ;)

Now you're the expert when the next guys asks :)

Remember, with great power comes great responsibility :) :)


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