2

I input the command:

     $ ls -lasrt

And the output includes (there are more results, these are the ones that confuse me):

   4 drwxr-xr-x 5 tuc40953 stdchem  4096 Jul  3 17:48 ..
   4 drwxr-xr-x 2 tuc40953 stdchem  4096 Jul  5 10:03 .

Could this mean that the last things that were written are in the previous directory?

  • 4
    Your directory is empty – Bernhard Jul 5 '12 at 14:21
  • @Bernhard I forgot to mention, there was MUCH MORE output than this alone. I just wanted to find what these specific lines meant. – ironcyclone Jul 6 '12 at 14:54
5

Every directory has a reference to itself, named .. That's a hard link, it actually exists as an entry in the directory itself. Every directory has a reference (again, a hard link) to its parent directory, named ..

What you see is the contents of a directory with no files or subdirectories in it. Since the date on . is July 5, and the date on .. is July 3, something happened in . after it was created, after something happened in .. By "something happened", I mean file or directory creation or deletion.

  • You can use -A instead of -a to avoid having them printed. – lynxlynxlynx Jul 5 '12 at 14:54
0

This will show you the files sorted by date including hidden files , given the size of blocks of each file.

  • True, but I think the part he was interested in is why there's . and .. – Michael Mrozek Jul 6 '12 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.