LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2011, 02:46 PM   #1
anon02
Member
 
Registered: Aug 2011
Posts: 223

Rep: Reputation: Disabled
How would I see how many times a file has been written to?


I have been making a game on a single computer, on the same location using Gedit and Vim. I heard about the 'Game in a day' contests and this prompted a thought; How long had development for my game gone on for, in hours, or revisions. I was wondering if there was a way to see how many times a file had been written to (On average I spent 10 minutes with it open, as there are long coding periods (about an hour) and shorter bug fixes) so I could see how long I had been working on it.

Even better than this would be to see how long it had been. I do not know any commands that could do this, are there any at all?
 
Old 09-22-2011, 02:51 PM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Why don't you use version control for your code? That way, you can track the changes. I'm not sure which version control systems allow you to see changes on a per-file basis, but I imagine it can be done (I've only got a basic knowledge of SVN).
 
Old 09-22-2011, 03:09 PM   #3
anon02
Member
 
Registered: Aug 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Nylex View Post
Why don't you use version control for your code? That way, you can track the changes. I'm not sure which version control systems allow you to see changes on a per-file basis, but I imagine it can be done (I've only got a basic knowledge of SVN).
I will probably look into that now.

I know I compiled it for Windows on 23rd August and I had been working on it for at least 10 days, so probably averaging 20 minutes a day since then.
 
Old 09-22-2011, 04:06 PM   #4
redw0lfx
LQ Newbie
 
Registered: Aug 2011
Distribution: FreeBSD 8, Arch Linux, Debian, CentOS 5.4, CentOS 6, Fedora
Posts: 10

Rep: Reputation: Disabled
There isn't any command to track how many times a file was written to, or how long it had been opened. The best you can do is when was the last modification or read access.

As for keeping track of your commits, SVN is good but it requires more of a central repository. I would instead suggest using 'git' as it does not need a central repository and you can initialize an active project easily, using 'git init /path/to/project'. However, neither SVN nor git can tell you how long you have been working on a file, it will only show when you committed your changes.
 
Old 09-22-2011, 05:23 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by redw0lfx View Post
There isn't any command to track how many times a file was written to, or how long it had been opened.
Well, for one thing there's FUSE loggedfs and you probably could do something with inotify too.
 
Old 09-22-2011, 05:35 PM   #6
redw0lfx
LQ Newbie
 
Registered: Aug 2011
Distribution: FreeBSD 8, Arch Linux, Debian, CentOS 5.4, CentOS 6, Fedora
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Well, for one thing there's FUSE loggedfs and you probably could do something with inotify too.
Sorry, I should have mentioned I meant, for an existing file already. Yes, I am sure there are tools that can record access to a file, but needs to be setup a head of time, and I don't think that is what the OP was asking. Could be wrong, it's been a long day. :-)
 
Old 09-23-2011, 01:34 AM   #7
anon02
Member
 
Registered: Aug 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by redw0lfx View Post
Sorry, I should have mentioned I meant, for an existing file already. Yes, I am sure there are tools that can record access to a file, but needs to be setup a head of time, and I don't think that is what the OP was asking. Could be wrong, it's been a long day. :-)
Ah, ok. I think I can work out an estimate and then I will go and use a versioning control system.
 
  


Reply



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
How to tell how many times a dvd rw disc has been written to? Mountain Man Linux - General 9 09-18-2009 03:01 AM
Where to put Bash scripts written to run at various times to examine Alsa sound probs xologist Linux - Software 3 08-13-2008 10:09 AM
moving a file while is being written omnio Programming 10 03-23-2007 09:25 AM
cannot open file to written venki Linux - Newbie 5 12-18-2006 06:57 AM
How to get last file written to directory kd5giv Linux - Networking 4 03-29-2004 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:24 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
Open Source Consulting | Domain Registration