Link to home
Start Free TrialLog in
Avatar of koppcha
koppchaFlag for United States of America

asked on

ls command

In UNIX
  it says  ls -c command list files by inode modification time. I know inode will be created only when file is created. So does this mean that this command would list the files in the order they are created ? What is the default order in which it would display the file the regular ls command ?

Thanks
Koppcha
Avatar of arthurjb
arthurjb

The regular ls command lists the files in alphabetical order.

I normally use ls -lat which gives the output in order of time.
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi koppcha,

There is one way to order the files by they last update date and time and you can do this with the following command: "ls -lrt" or you can use the following to do this by creation time: ls -lrc

I hope it helps.
root_start.

Please read previous comments explaining why Unix has no creation time.
So, koppcha can use: "ls -lrt" that lists from last update time. =0)