04-08-2007
Also, in my home dir I did a nfs mount of a file from a storage system. I did not specify any noatime option but yet the atime is not changing for thie file on doing a cat.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a tab delimited file which has 27 character fields. The file needs to be loaded into an Oracle table. But the challenge is that everytime the file comes it may or may not have values in all 27 fields.
Column Definition of the 27 fields:
TYPE: Char (1)
NAME: Char (30)
CUSTOM_VAL: Char... (8 Replies)
Discussion started by: madhunk
8 Replies
2. Shell Programming and Scripting
I have a directory with its subdirectories and files. I want to change them all to read only. Say it is ~/test
chmod -R 444 ~/test
chmod: `/home/myname/test': permission denied
I do not understand. Do I have to have executable mode for a diirectory to access.
How can I change ~/test to... (5 Replies)
Discussion started by: lalelle
5 Replies
3. Tips and Tutorials
Unix keeps 3 timestamps for each file: mtime, ctime, and atime. Most people seem to understand atime (access time), it is when the file was last read. There does seem to be some confusion between mtime and ctime though. ctime is the inode change time while mtime is the file modification time. ... (2 Replies)
Discussion started by: Perderabo
2 Replies
4. Linux
Hello everyone I recently clone a system and doing so it gave my nics cards id's of eth3 and eth4 instead of eth0 and eth1. Is there a config file or something out there where I can change these back? All help will be appreciated. (2 Replies)
Discussion started by: aojmoj
2 Replies
5. Shell Programming and Scripting
Hi All
At the moment the following code works but ideally i do not want to have to change the original $1
tr "\r" "\n" < "$1" > "$1.fix"
printf "\n" >> "$1.fix"
mv "$1.fix" "$1"
FILE=$1
coffee_out="splitmovie"
coffee_fill="-splitAt"
coffee_end="-self-contained -o output.mov $2"... (1 Reply)
Discussion started by: babajuma
1 Replies
6. UNIX for Advanced & Expert Users
hi, in trying to maintain your directories, one needs to do some housekeeping like removing old files. the tool "find" comes in handy. but how would you decide which option to use when it comes to, say, deleting files that are older than 5 days?
mtime - last modified
atime - last accessed... (4 Replies)
Discussion started by: pinoy43v3r
4 Replies
7. UNIX for Dummies Questions & Answers
I need to sort through a volume that contains video files by access time and delete files that have not been accessed over x days. I have to use the access time as video files are originals that do not get modified, just read
Testing commands on a local test folder...
$ date
Wed Sep 28... (10 Replies)
Discussion started by: canon273
10 Replies
8. Programming
I have the following piece of code. Currently the command line arguments are passed as shown below using the "= "sign. I capture the name of the argument, for example vmod and it's corresponding user parameter which is jcdint-z30.cmd.
./raytrac vmod=jcdint-z30.cmd srFile=jcdint.sr
Now I want... (12 Replies)
Discussion started by: kristinu
12 Replies
9. Shell Programming and Scripting
I want to read a constantly changing file and do some operation on text found in that file.
Actually that is log file of linux system and whenever i find a matching string in that file i want to create a text file with timestamp. is it possible to read that file?
here is sample output of log... (7 Replies)
Discussion started by: kashif.live
7 Replies
10. Solaris
It is widely documented that on zfs atime updates the access time on zfs.
Where is the access time updated on Solaris 11.2?
If I create file atimetest.txt under rpool/export/home:
# zfs list rpool/export/home
NAME USED AVAIL REFER MOUNTPOINT
rpool/export/home 13.3G ... (5 Replies)
Discussion started by: jabberwocky
5 Replies
LEARN ABOUT DEBIAN
net::sftp::foreign::attributes
Net::SFTP::Foreign::Attributes(3pm) User Contributed Perl Documentation Net::SFTP::Foreign::Attributes(3pm)
NAME
Net::SFTP::Foreign::Attributes - File/directory attribute container
SYNOPSIS
use Net::SFTP::Foreign;
my $a1 = Net::SFTP::Foreign::Attributes->new();
$a1->set_size($size);
$a1->set_ugid($uid, $gid);
my $a2 = $sftp->stat($file)
or die "remote stat command failed: ".$sftp->status;
my $size = $a2->size;
my $mtime = $a2->mtime;
DESCRIPTION
Net::SFTP::Foreign::Attributes encapsulates file/directory attributes for Net::SFTP::Foreign. It also provides serialization and
deserialization methods to encode/decode attributes into Net::SFTP::Foreign::Buffer objects.
USAGE
Net::SFTP::Foreign::Attributes->new()
Returns a new "Net::SFTP::Foreign::Attributes" object.
Net::SFTP::Foreign::Attributes->new_from_buffer($buffer)
Creates a new attributes object and populates it with information read from $buffer.
$attrs->as_buffer
Serializes the Attributes object $attrs into a buffer object.
$attrs->flags
returns the value of the flags field.
$attrs->size
returns the values of the size field or undef if it is not set.
$attrs->uid
returns the value of the uid field or undef if it is not set.
$attrs->gid
returns the value of the gid field or undef if it is not set.
$attrs->perm
returns the value of the permissions field or undef if it is not set.
See also "stat" in perlfunc for instructions on how to process the returned value with the Fcntl module.
For instance, the following code checks if some attributes object corresponds to a directory:
use Fctnl qw(S_ISDIR);
...
if (S_ISDIR($attr->perm)) {
# it is a directory!
}
$attrs->atime
returns the value of the atime field or undef if it is not set.
$attrs->mtime
returns the value of the mtime field or undef if it is not set.
%extended = $attr->extended
returns the vendor-dependent extended attributes
$attrs->set_size($size)
sets the value of the size field, or if $size is undef removes the field. The flags field is adjusted accordingly.
$attrs->set_perm($perm)
sets the value of the permsissions field or removes it if the value is undefined. The flags field is also adjusted.
$attr->set_ugid($uid, $gid)
sets the values of the uid and gid fields, or removes them if they are undefined values. The flags field is adjusted.
This pair of fields can not be set separatelly because they share the same bit on the flags field and so both have to be set or not.
$attr->set_amtime($atime, $mtime)
sets the values of the atime and mtime fields or remove them if they are undefined values. The flags field is also adjusted.
$attr->set_extended(%extended)
sets the vendor-dependent extended attributes
$attr->append_extended(%more_extended)
adds more pairs to the list of vendor-dependent extended attributes
COPYRIGHT
Copyright (c) 2006-2008 Salvador Fandin~o.
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-11 Net::SFTP::Foreign::Attributes(3pm)