list file without showing the modified date

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
sub320
Level 1
Level 1
Posts: 5
Joined: Thu May 31, 2018 4:54 am

list file without showing the modified date

Post by sub320 »

if I would like to list all files in my server but do not show the date , what can I do ?

the below will show all file info. , how to exclude the date ?

# find / -print -exec ls {} \;


Tried the following command , but not work
find / -print -exec -printf '%t %s %p {} \;
find / -printf "%p %TY-%Tm-%Td %TH:%TM:%TS %Tz\n"
find / -print -exec ls -la | cut -c 1-31 \;
acerimusdux
Level 4
Level 4
Posts: 343
Joined: Sat Dec 26, 2009 3:36 pm

Re: list file without showing the modified date

Post by acerimusdux »

Looks like you want something like:
ls -la|cut -c 1-35,48-
sub320
Level 1
Level 1
Posts: 5
Joined: Thu May 31, 2018 4:54 am

Re: list file without showing the modified date

Post by sub320 »

ls -la|cut -c 1-35,48- seems only show current directory , not all files in sub-directory .

thanks
Post Reply

Return to “Newbie Questions”