shell script for The script will receive the filename or filename with its full path. The script should obtain information about this file as given by "ls -l" and display it in proper format. e.g. - Filname : , File access permission : , Number of links : , Owner of the file : , Group to which belongs : , Size of file : , File modification date : , File modification time : sh sh6.sh out.sh

-----------------------------Script---------------------------
str=`ls -l $1`
echo "file Name : " $1
set -- $str
echo "File permissions : " $1
echo "Number of links : " $2
echo "Owner of the file : " $3
echo "Group : " $4
echo "Size of file : " $5
-----------------------------output---------------------------
file Name :  out.sh
File permissions :  -rwxrwxrwx
Number of links :  1
Owner of the file :  dca19
Group :  dca19
Size of file :  242
-----------------------------END------------------------------
SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment