LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


View Poll Results: Would you like all timestamps settable safely for your distro?
Yes 1 14.29%
No 6 85.71%
Voters: 7. You may not vote on this poll

Reply
  Search this Thread
Old 01-12-2024, 12:23 PM   #1
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195
Blog Entries: 2

Rep: Reputation: 5
Question Would you like a safe all (no exception) timestamps supported setter on your Linux?


For Linux there is "touch" for modified and accessed times. Some systems support created at times and/or changed at times. I know "debugfs" with "set_inode_field" is a common way to set those timestamps. It is a Linux debugger system and unsafe for regular use. How many of you would like feature of a safe way to set inode data such as all timestamps? Feel free to tell your Linux distro developers if you do want it. As of now there is only "debugfs" and "touch" for that. Good uses would be like from Windows or other systems that support created at or changed at or backups and restore without system images. Do not expect Linux that you do not control to be like this any time soon but would you prefer it? I realize there is rsync now and -N for created at. Never seen a changed at setter other than debugfs. POSIX compliance means all Linux has changed at so you have that and what touch can set. X E.

Last edited by maybeJosiah; 01-12-2024 at 02:43 PM. Reason: Attributes maybe
 
Old 01-12-2024, 06:45 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
This is a very weird poll!

The tools available already allow us to manipulate all Linux File System timestamps (although some easier than others) and that is all we need.
I would not WANT Microsoft style time stamps on my Linux systems, and that is where this gets you if you pursue it to the logical conclusions.

Just "NO"!
 
1 members found this post helpful.
Old 01-12-2024, 06:49 PM   #3
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Not all safely but most. Changed at is not safely settable on a running system and neither is created at according to what I know. If you want to change what I know feel free though. X E.
 
Old 01-13-2024, 03:46 AM   #4
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,849

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
crtime (birth/creation) tells when a free inode was taken into use and ctime (change) tells when the inode data was last changed. If you copy a file (cp -p / tar / rsync -a) to the same file system or to a backup disk, you use another inode, and crtime and ctime will be new. Or if you edit an existing file, your editor typically creates a new file (using another inode) for the edited text and finally renames the file name in the directory to the old name. So, the file will have a different inode and a different crtime. crtime does not mean when the text document was originally created but when the inode was taken into use where the file content now is. If you back up your files and restore, you use new inodes with new inode numbers and they should have new crtime. (An exception is if you do an exact bit copy of the file system. Then the files will use the original inodes, of course.)

Why would you want to change crtime and ctime? They don't affect anything. mtime is useful: it's THE file date, preserved by tar and everything. atime is also useless nowadays. Because of the adverse effect on performance, everything is mounted with noatime.

Quote:
Feel free to tell your Linux distro developers if you do want it.
It's the kernel developers who have decided userland should not have write access to inode ctime/crtime.

Last edited by Petri Kaukasoina; 01-13-2024 at 03:48 AM.
 
1 members found this post helpful.
Old 01-13-2024, 10:22 AM   #5
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I like to lose nothing upon restores and I use crtime to know when I started working on stuff. X E.
 
Old 01-13-2024, 10:54 AM   #6
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Well, I can't delete this but I assume all or most votes going forward will be no so can like a moderator or something just delete this? I was posting this because I thought it was outragous that that command does not exist on much of Linux including mine. X E.
 
Old 01-13-2024, 02:08 PM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
I timestamp my projects. IT can be as easy as
Code:
echo -n "start : " >> workday.log;date -I >> workday.log
in my project folder.

My EOD script has a line like
Code:
echo -n "end   : " >> workday.log;date -I >> workday.log
line to record my time.

I can easily code a script to extract the active work times and generate daily and weekly totals for hours, minutes, and seconds (or hours decimal) on the project.

Last edited by wpeckham; 01-13-2024 at 02:10 PM.
 
Old 01-13-2024, 02:26 PM   #8
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Nice. X E.
 
  


Reply

Tags
back-up, device, restore, timestamp, transfer



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOU TO USE IDEA NET SETTER usb Modem IN LINUX OS skri Linux - Newbie 2 05-08-2010 10:36 AM
Microsoft at a Crossroads: Future Trend-Setter or Future Pariah? acrossad General 6 02-27-2009 01:44 PM
Fluxbox 0.9.13 fbsetbg not detecting any bg setter debiant Linux - Desktop 1 08-18-2006 03:12 PM
Good wallpaper setter (image viewer) Creak Linux - Software 2 06-02-2004 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:32 PM.

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