on-internet
← Community

awk '{print $9}' the last ls -l column including any spaces in the file name

Stack Overflow ·

How would I get awk to output the whole file name in ls -l if some of the files have spaces in them. Usually, I can run this command: ls -l | awk '{print $9}' That doesn't work if the files have spaces in them. Is it possible to print $9, $10, $11 etc as well somehow?

Comments

Sign in or sign up to comment and upvote.

No comments yet.