Sponsored Content
Homework and Emergencies Homework & Coursework Questions How do I get at the modification date for a file as a variable for a script? Post 302379892 by ironmask2004 on Sunday 13th of December 2009 04:07:34 AM
Old 12-13-2009
try this code to get the modification date

Code:
for ii in  `ls -l | awk -F" "  ' {print $6}'`
do
 echo $ii
done


anyway you can use find with option to get the files updated since a specific date

Last edited by DukeNuke2; 12-13-2009 at 05:14 AM.. Reason: please use code tags!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

command for modification date of a file

Good morning, I would like to find all files of a certain type and display their name as well as their modification date. In order to do this, I would do the following: find ./ -name *.csv | ???????? My question: what to put after the pipe instead of the question marks? Is there a basic... (5 Replies)
Discussion started by: scampsd
5 Replies

2. UNIX for Dummies Questions & Answers

Shell script: last modification date for a file

Hi i have a ques in Shell scripting: ques: accept a filename as a command line argument. Validate the input and display the last modification date for that file. Help pls. (4 Replies)
Discussion started by: onlyc
4 Replies

3. UNIX for Dummies Questions & Answers

File comparision and modification using shell script

Hello everyone, I would like to know how to compare two files and modify any differences with some other data using shell script. I think it would be better understood with an example. I got two files named 'filex' and filey'. 'filex' is constant file without any changes in data. 'filey' is... (2 Replies)
Discussion started by: maddy81
2 Replies

4. Shell Programming and Scripting

List the file or files with last modification date

hi. I need help my programing friends :p I need to list all the files with a certain name (for example FileName) by last modification date but only the one with the last date. If there are two files with the same name and same modification date it should print the both. For example in this set... (6 Replies)
Discussion started by: KitFisto
6 Replies

5. UNIX for Dummies Questions & Answers

Last modification date without 'ls'

Hi, I'm executing a script to check if a file has been modified on a shared folder. I use this to start another script every time the file has been modified. To do this I use the 'ls' command to get the last modification date of the file. My problem is that the computer hosting the shared... (5 Replies)
Discussion started by: Peuj
5 Replies

6. OS X (Apple)

get file modification date in number format (yyyy mm dd hh mm ss)

How do i get the file modification date in number format (yyyy mm dd hh mm ss) i used ls -l pathname but month is still in text "Aug" and year and time is not allways shown. time is show if it is in this year. and year is shown if it is before this year. what do i need to get... (7 Replies)
Discussion started by: rvdokkum
7 Replies

7. UNIX for Dummies Questions & Answers

How do you get the last modification date of a file?

I'm trying to get the date output to be in the form yyyy-mm-dd (e.g. 2013-01-18) !/bin/sh modDate=$(stat -c %y $1) echo $modDate >> $1 When I run this on another file (by typing ./dateScript theFile.txt), I keep getting this message: stat: illegal option -- c What's wrong with my code... (2 Replies)
Discussion started by: Nate18
2 Replies

8. Shell Programming and Scripting

Date Modification

Hello all ! I have a piece of code that generates the date of one day ago: /usr/bin/gdate --date='1 day ago' | awk '{print $2 " " $3}' Nov 3 I want the output to be in the form : Nov 03 What other operation should I do for that ? Help (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

9. Programming

File date/time modification and permissions

First, oh great Unix gurus, forgive if this is a stupid question. Unix/Linux is not my main thing but I have been programming in C/C++ for many years. I will do my best to be specific. I have a program in C/C++ that needs to modify the time of a given file. Currently I do this using utime()... (5 Replies)
Discussion started by: Pug
5 Replies

10. Shell Programming and Scripting

Subtract a file's modification date with current date

SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise Hi, In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file. How do I achieve this? Regards, Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
EXO-DESKTOP-ITEM-EDIT(1)					   User Commands					  EXO-DESKTOP-ITEM-EDIT(1)

NAME
exo-desktop-item-edit - Create icons on the desktop DESCRIPTION
Usage: exo-desktop-item-edit [OPTION...] [FILE|FOLDER] Help Options: -?, --help Show help options --help-all Show all help options --help-gtk Show GTK+ Options Application Options: -c, --create-new Create a new desktop file in the given directory -t, --type Type of desktop file to create (Application or Link) --name Preset name when creating a desktop file --comment Preset comment when creating a desktop file --command Preset command when creating a launcher --url Preset URL when creating a link --icon Preset icon when creating a desktop file -v, --version Print version information and exit --display=DISPLAY X display to use AUTHOR
Written by Benedikt Meurer <benny@xfce.org>. exo-desktop-item-edit comes with ABSOLUTELY NO WARRANTY, You may redistribute copies of exo-desktop-item-edit under the terms of the GNU Lesser General Public License which can be found in the exo source package. Please report bugs to <http://bugzilla.xfce.org/>. COPYRIGHT
Copyright (C) 2005-2006 os-cillation e.K. All rights reserved. SEE ALSO
The full documentation for exo-desktop-item-edit is maintained as a Texinfo manual. If the info and exo-desktop-item-edit programs are properly installed at your site, the command info exo-desktop-item-edit should give you access to the complete manual. exo-desktop-item-edit 0.3.1.10rc1 September 2006 EXO-DESKTOP-ITEM-EDIT(1)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy