Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Notes on zsh, zsh/files and recovery



On Oct 19,  5:28pm, Phil Pennock wrote:
} 
} Yeah, "echo *" was the first thing I did, but I needed to see the size
} and timestamps to figure out which files were affected.

If your complaint is about speed, a lot faster would probably be

zls () {
  local -a st
  local name dev inode mode nlink uid gid rdev
  local size atmim mtime ctme blksize blocks link
  [[ $# -eq 0 ]] && set -- *
  zstat -nsLA st "$@"
  for name dev inode mode nlink uid gid rdev \
      size atmim mtime ctme blksize blocks link \
    in "$st[@]"
  do print -r -- "$mode $nlink ${(r:8:)uid} ${(r:8:)gid} ${(l:9:)size} $name"
  done
}

Requires a recent enough zsh to have the multiple-assignment "for" syntax.



Messages sorted by: Reverse Date, Date, Thread, Author