أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
i had a very large file in my linux dedicated server i leased from www.webune.com and i wanted to see what were the last list, it was an error log file and it was huge, but opening would mean i would have to wait a while just to see the last lines. well, linux being such a wonderful operating system, it has the tail command so to see the last10 lines on my error log file all i had to do is send this command in the linux shell and it would get and show me the last ten lines:
CODE: tail error_log.txthey wait a minute, what about if you wanted to display the last15 lines?well you can do that with tail: this is how you would display them:CODE:
tail -15 error_log.txtyou can change15 to whatever number of lines you want
In linux servers, you can use the following command,
--
stat filename
--
Ex:
$ stat test.php
File: `test.php' Size:13379 Blocks:28 IO Block:4096 regular file
Device:15h/21d Inode: Links:1
Access: (0644/-rw-r--r--) Uid: (1944/hrishikesh) Gid: (1100/pivusers)
Access:::33:40. +0530
Modify:::33:40. +0530
Change:::33:40. +0530
dir command with switch options will give file time creation, last saved, last writen, archive.
Following switch providing time related stuff
[time] /T: the time field to display & use for sorting /T:C Creation /T:A Last Access /T:W Last Written (default) [file_attributes] /A: /A:D Folder /A:-D NOT Folder /A:R Read-only /A:-R NOT Read-only /A:H Hidden /A:-H NOT Hidden /A:A Archive /A:-A NOT Archive /A Show all files Several attributes may be combined e.g. /A:HD-RExamples:
dir /A:A /T:C
in order to get mentioned details in at once, you will need to create batch or script, but you can get one at a time as below
dir /4 /T:C
dir /4 /T:Adir /4 /T:W
/T:C Creation date /T:A Last Access date /T:W Last Written date (default)
hope this was helpful