LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2014, 10:49 AM   #1
AnkitDewang
LQ Newbie
 
Registered: Jul 2014
Location: India
Posts: 6

Rep: Reputation: Disabled
Smile Time Stamp


Hello Everyone...
What is Timestamp, and how we use it please help and give some explanation about it...

Thanks in advance !!!
 
Old 07-24-2014, 10:51 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
in what context?
 
Old 07-24-2014, 10:55 AM   #3
AnkitDewang
LQ Newbie
 
Registered: Jul 2014
Location: India
Posts: 6

Original Poster
Rep: Reputation: Disabled
In the context of administration for the unix admintrator...
 
Old 07-24-2014, 11:11 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Its ah,.. the creation, modification, or access time of a file or directory.

As seen here:
Code:
$ ls -alh
-rw-r--r--  1 root root  54K Jul 24 14:47 v0.3.1.zip
-rw-------  1 root root  699 Jul 24 15:08 .viminfo
-rw-r--r--  1 root root    0 Jul 24 15:08 you_should_google
-rw-r--r--  1 root root    0 Jul 24 15:08 this_question
                               ^^^^^^-- This is a timestamp
also:
Code:
  
$ stat you_should_google_this_question
  File: `you_should_google_this_question'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fe00h/65024d    Inode: 524879      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-07-24 15:09:47.849884531 +0000  << This 
Modify: 2014-07-24 15:09:47.849884531 +0000  << This
Change: 2014-07-24 15:09:47.849884531 +0000  << And this are timestamps.
 Birth: -

Last edited by szboardstretcher; 07-24-2014 at 11:16 AM.
 
Old 07-24-2014, 11:14 AM   #5
AnkitDewang
LQ Newbie
 
Registered: Jul 2014
Location: India
Posts: 6

Original Poster
Rep: Reputation: Disabled
How I am able to find this ????
Do you please provide me the command as I am the beginner and don't have much knowledge regarding this..
 
Old 07-24-2014, 11:18 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
ls -alh
stat some_file_name
 
Old 07-24-2014, 11:22 AM   #7
AnkitDewang
LQ Newbie
 
Registered: Jul 2014
Location: India
Posts: 6

Original Poster
Rep: Reputation: Disabled
When I am using this command I got an error message, i.e.

$ls -alh
ls: NOt a recognized flag: h
Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...]



Will you provide me some book or document or any other material which helps me to learn the basics and understand everything, if I want to work as Unix Admin..

Thank you in advance...
 
Old 07-24-2014, 11:26 AM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
only type:

Code:
ls -al
Sorry, I add the 'h' on as a habit.

Certainly, here is the linux admin guide.

http://www.tldp.org/LDP/sag/html/index.html
 
Old 07-24-2014, 11:29 AM   #9
AnkitDewang
LQ Newbie
 
Registered: Jul 2014
Location: India
Posts: 6

Original Poster
Rep: Reputation: Disabled
This command also not works...

Thank you for your help and providing the link for the Linux Admin Guide...
 
Old 07-25-2014, 08:07 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
1. Please tell us what Linux distro+version you have.
Code:
ls -l
ls -lh
should both work.

2. There's no such thing as creation time in *nix
http://docstore.mik.ua/orelly/perl4/cook/ch09_01.htm

In theory, ext4 now supports a 'birth time', but most tools don't, so its usually zero, if you can even access it.
 
Old 07-25-2014, 11:23 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,101
Blog Entries: 10

Rep: Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524
Quote:
Originally Posted by AnkitDewang View Post
This command also not works...

Thank you for your help and providing the link for the Linux Admin Guide...
I'd suggest you perform the following and report the results:
Code:
$ which ls

# When you get the outcome of the which command for ls, then give a long listing of ls, example:

$ which ls
/bin/ls
$ ls -l /bin/ls
-rwxr-xr-x 1 root root 104508 Mar 31 2012 /bin/ls

# Next get the version of ls which you have by typing "ls --version", sample output following:

$ ls --version
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Richard M. Stallman and David MacKenzie.
$ 

# All of this is to tell whether or not you're using actual ls or if ls is a symbolic link to something
# called busybox which emulates ls and may provide different features.
Following this, other things to offer to the forum would be the version of Linux you have, including both the kernel and distribution name. Some things to try to get this information are:
Code:
$ cat /etc/*-release

# This will output the information in that file to show your release information.
# Another command is 'lsb_release -a' which also can print out the release if that command is available.

$ lsb_release -a

# A final check would be to determine whether or not there is an alias for the ls command.
# If you type 'alias' you will see all aliases, therefore see if there is one assigned for ls.
The concerns here by me and others are that you don't seem to have a properly working ls command, either because there is an alias, because ls is very old, or because ls is run out of busybox.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
time stamp of files ZAMO Linux - General 1 12-17-2008 06:45 AM
Using time-stamp in emacs dualcore75 Programming 1 02-08-2007 07:41 AM
presentation time stamp nesta Programming 1 11-24-2006 02:57 AM
Time stamp Kalyani1 Linux - Software 0 11-07-2005 03:58 PM
Time stamp in Samba is 11 hours behind time stamp in Linux Linh Linux - General 3 09-04-2003 01:44 PM


All times are GMT -5. The time now is 04:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration