LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-26-2011, 05:01 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Rep: Reputation: 54
Linux dir and dates


It only occured to me now, but why is it that date listings are not consistent? ex:

Code:
  4 drwxr-xr-x 2 iceteks iceteks   4096 Mar 26  2010 fonts
  4 drwxr-xr-x 8 iceteks iceteks   4096 Mar 26  2010 html
 16 -rw-r--r-- 1 iceteks iceteks  13123 Aug 19 17:43 index.php
  4 drwxr-xr-x 3 iceteks iceteks   4096 Mar 26  2010 lang
  8 -rw-r--r-- 1 iceteks iceteks   5434 Mar 26  2010 lasttopics.php
They are all Month Day Year but one (from that particular extract, there's more), why is the 3rd there one Month Day Time? I know the year is not 2011 because we have not hit august 2011 yet, but what if it's 2009 or 2008? I would not know.

One of my sites got hacked and I'm just trying to figure out what the hacker got into and trying to figure how he got in so I can fix the exploit.
 
Old 01-26-2011, 05:17 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Try
Code:
ls --full-time
By the way - changing index.php is often method used by hackers/bots. They usualy get passwords to ftp stored in ftp client applications, like TotalCommander, by trojans installed on PC.

Last edited by eSelix; 01-26-2011 at 06:57 PM. Reason: z1p explained it.
 
Old 01-26-2011, 05:29 PM   #3
z1p
Member
 
Registered: Jan 2011
Location: the right coast of the US
Distribution: Ubuntu 10.04
Posts: 80

Rep: Reputation: 23
Looking up info on ls or using man will give you more info, but the basic answer is if the file was modified recently (I believe within the last 6 months) then the time is shown instead of the year. So if the time is shown, you know the date is within the last months, and from there can easily determine the year.

If you want to get a more consistent or specific date format, check the man for ls. Depending you version of you may be able to specify the date format.
 
1 members found this post helpful.
Old 01-27-2011, 11:44 AM   #4
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Oh ok, so it's time based, so last 6 months it shows differently. That's good to know. I don't see any files that were modified so I'm thinking the attack was SQL injection and they modified the templates in the database. I never use FTP so my password is never sent in clear text.

I just need to find this injection exploit and fix it.
 
  


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
LXer: Linux shows name dates, ask for papers LXer Syndicated Linux News 0 12-21-2010 06:40 AM
Linux app to quickly and easily change file dates? walterbyrd Linux - Software 2 08-14-2010 05:12 PM
Command to display /dir, /dir/sub, /dir/sub/files knockout_artist Linux - Newbie 9 10-25-2007 02:57 PM
Linux file dates ISummers Linux - Software 2 07-20-2007 09:27 AM
xCopying from NTFS XP to Linux Based storage - problem = dates discrimination amfony Linux - General 4 11-30-2006 04:02 PM

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

All times are GMT -5. The time now is 08:38 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