Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone tell me about the output/purpose of this command?

ls -l | grep gopal | wc -l

share|improve this question

closed as not a real question by Zypher, Massimo, Doug Luxem, drAlberT, Chris S Aug 24 '10 at 18:48

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

homework? context of question? – Bart Silverstrim Aug 24 '10 at 18:41

It will show the number of files in the current directory which contain the string "gopal" in their name.

Or at least it would, if it had been written correctly...

share|improve this answer
What's wrong with it? Seems fine to me – James L Aug 24 '10 at 18:42
Or possibly files owned by user/group "gopal" – jscott Aug 24 '10 at 18:45
good point, so ls -1 would probably be better than ls -l – James L Aug 24 '10 at 18:47
@James: it wasn't fine when first posted. – Massimo Aug 24 '10 at 20:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.