Sponsored Content
Full Discussion: Stat value changes
Top Forums Shell Programming and Scripting Stat value changes Post 302775463 by anil510 on Tuesday 5th of March 2013 12:50:30 AM
Old 03-05-2013
Stat value changes

Die to what all operations, the "Modify" and "Change" values of stat output changes for a file.

I found, during editing a file, Change and Modify alters. When chmod'ing Change alters, while Modify doesnot alters. Is there more situations where these changes?
 

10 More Discussions You Might Find Interesting

1. Programming

stat() fails!!! what can i do?

Hi all, I can not understand why my stat() function fails all the time when function tries to go recursevly. Someone suggested that it might be poiter problem. Please, look up my code at: www.donnelly.cc.ks.us/readdir_test.c. How can i solve this problem? Any suggestion are welcome! Thank you... (3 Replies)
Discussion started by: solvman
3 Replies

2. UNIX for Dummies Questions & Answers

Cannot stat?

Hi! I ran into a problem with a job I'm running. All it is doing is a "touch" on a filename. However, when I ran the job, it error'd out and got the message 'cannot stat'. When I restarted the job (making no changes) it worked just fine. Anyone know what this means? (1 Reply)
Discussion started by: lgardner
1 Replies

3. UNIX for Advanced & Expert Users

stat

the output of stat command is Size: 238 Blocks: 8 IO Block: 4096 regular file Device: 80ah/2058d Inode: 736783 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ gajju) Gid: ( 500/ gajju) Access: 2008-09-08 20:00:15.000000000 +0530 Modify: 2008-09-08... (6 Replies)
Discussion started by: gajju
6 Replies

4. Programming

Q with stat()

From reading various articles on the net, I know stat() is used on files to get things like permissions, sizes etc... As a folder is a special type of file in Unix, I assumed that stat() could work on it as well as any general file. However, from running my program, perror() reported that the... (3 Replies)
Discussion started by: JamesGoh
3 Replies

5. Solaris

stat: Available on Solaris?

JoeyG's note in the following thread got me thinking about using stat more often in file operations. I've only ever used it within perl - didn't even realize there was a commandline version of it.... (3 Replies)
Discussion started by: Smiling Dragon
3 Replies

6. Shell Programming and Scripting

stat command with ls -l

If i do ls -l i get the result rwx-rw-r ...... ............... file. How can i get the result in octal format. All other output will be the same as ls -l shows. The rwx-rw-r would be like 755 etc. (7 Replies)
Discussion started by: cola
7 Replies

7. Shell Programming and Scripting

using File::stat

Hello everyone, I need some help on a perl script. The script is to open a dir and print out the date of last modification on all files. I'm been trying this code but it doesn't work. use File::stat; open (D,"$ARGV") or die "Can't open\n"; while (defined ($file = readdir D)) { next... (3 Replies)
Discussion started by: new bie
3 Replies

8. UNIX for Dummies Questions & Answers

stat output

hi guys i got confused about stat output stat manual says File : Size in Bytes Blocks : Number of blocks used IO Block : Size in bytes of every block. when i use stat command for passwd file it says ~#stat /etc/passwd File: `/etc/passwd' Size: 999 Blocks: 8 IO... (4 Replies)
Discussion started by: mhs
4 Replies

9. UNIX for Dummies Questions & Answers

Stat command

i know this command does not exist in solaris. however, i read somewhere on this forum that basically everything the stat command provides in other oses can be obtained in solaris using the ls command. i've searched the forum for a while now and i cant find the thread. does anyone know about... (1 Reply)
Discussion started by: SkySmart
1 Replies

10. UNIX for Dummies Questions & Answers

Help with stat command

Hi Experts, I am here with very simple request: #!bin/bash a=`stat -c %y log1.csv` echo $a and this stat command returning value as 2013-08-11 05:42:10.000000000 -0400: But I want to see in mm/dd/yyyy format? any help is highly appreciated thank you ---------- Post... (9 Replies)
Discussion started by: parpaa
9 Replies
FSDB(8) 						    BSD System Manager's Manual 						   FSDB(8)

NAME
fsdb -- FFS debugging/editing tool SYNOPSIS
fsdb [-dFn] -f fsname DESCRIPTION
fsdb opens fsname (usually a raw disk partition) and runs a command loop allowing manipulation of the file system's inode data. You are prompted to enter a command with ``fsdb (inum X)>'' where X is the currently selected i-number. The initial selected inode is the root of the filesystem (i-number 2). The command processor uses the editline(3) library, so you can use command line editing to reduce typing if desired. When you exit the command loop, the file system superblock is marked dirty and any buffered blocks are written to the file system. The -d option enables additional debugging output (which comes primarily from fsck(8)-derived code). The -F option indicates that filesystem is a file system image, rather than a raw character device. It will be accessed 'as-is', and no attempts will be made to read a disklabel. The -n option disables writing to the device, preventing any changes from being made to the filesystem. COMMANDS
Besides the built-in editline(3) commands, fsdb supports these commands: help Print out the list of accepted commands. inode i-number Select inode i-number as the new current inode. back Revert to the previously current inode. clri Clear the current inode. lookup name cd name Find name in the current directory and make its inode the current inode. Name may be a multi-component name or may begin with slash to indicate that the root inode should be used to start the lookup. If some component along the pathname is not found, the last valid directory encountered is left as the active inode. This command is valid only if the starting inode is a directory. active print Print out the active inode. uplink Increment the active inode's link count. downlink Decrement the active inode's link count. linkcount number Set the active inode's link count to number. ls List the current inode's directory entries. This command is valid only if the current inode is a directory. blks List the current inode's blocks numbers. findblk disk block number ... Find the inode(s) owning the specified disk block(s) number(s). Note that these are not absolute disk blocks numbers, but offsets from the start of the partition. rm name del name Remove the entry name from the current directory inode. This command is valid only if the current inode is a directory. ln ino name Create a link to inode ino under the name name in the current directory inode. This command is valid only if the current inode is a directory. chinum dirslot inum Change the i-number in directory entry dirslot to inum. chname dirslot name Change the name in directory entry dirslot to name. This command cannot expand a directory entry. You can only rename an entry if the name will fit into the existing directory slot. chtype type Change the type of the current inode to type. type may be one of: file, dir, socket, or fifo. chmod mode Change the mode bits of the current inode to mode. You cannot change the file type with this subcommand; use chtype to do that. chflags flags Change the file flags of the current inode to flags. chown uid Change the owner of the current inode to uid. chgrp gid Change the group of the current inode to gid. chgen gen Change the generation number of the current inode to gen. mtime time ctime time atime time Change the modification, change, or access time (respectively) on the current inode to time. Time should be in the format YYYYMMDDHHMMSS[.nsec] where nsec is an optional nanosecond specification. If no nanoseconds are specified, the mtimensec, ctimensec, or atimensec field will be set to zero. quit, q, exit, <EOF> Exit the program. SEE ALSO
editline(3), fs(5), clri(8), fsck(8) HISTORY
fsdb uses the source code for fsck(8) to implement most of the file system manipulation code. The remainder of fsdb first appeared in NetBSD 1.1. WARNING
Use this tool with extreme caution -- you can damage an FFS file system beyond what fsck(8) can repair. BUGS
Manipulation of ``short'' symlinks doesn't work (in particular, don't try changing a symlink's type). You must specify modes as numbers rather than symbolic names. There are a bunch of other things that you might want to do which fsdb doesn't implement. BSD
January 3, 2004 BSD
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy