-l
This commit is contained in:
parent
489e1f66ba
commit
021bd4f5ad
1 changed files with 6 additions and 4 deletions
10
ls.rb
10
ls.rb
|
@ -64,10 +64,12 @@ def output_file_datails(filenames)
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner_info(file_stat, filenames)
|
def owner_info(file_stat, filenames)
|
||||||
print " #{file_stat.nlink}"
|
[
|
||||||
print " #{Etc.getpwuid(file_stat.uid).name}"
|
file_stat.nlink.to_s.prepend(' '),
|
||||||
print " #{Etc.getgrgid(file_stat.gid).name}"
|
Etc.getpwuid(file_stat.uid).name,
|
||||||
" #{file_stat.size}".rjust(max_filename_length(filenames))
|
Etc.getgrgid(file_stat.gid).name,
|
||||||
|
file_stat.size.to_s.rjust(max_filename_length(filenames))
|
||||||
|
].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def symbolic(filenames)
|
def symbolic(filenames)
|
||||||
|
|
Loading…
Reference in a new issue