Swaminathan K
asked on
Unix Command -- Challenging question
Hi Team,
I need an help on the unix command, I need to write an single command which will display the number of files in the current directory.
I tried the below command , but not getting the desired output.
ls-al | grep "^d|^ " | wc -l
Any help is really appreciated.
I need an help on the unix command, I need to write an single command which will display the number of files in the current directory.
I tried the below command , but not getting the desired output.
ls-al | grep "^d|^ " | wc -l
Any help is really appreciated.
ASKER
Hi I mean both . any help is reallly appreciated
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
awesome. Thanks a lot.
Are you trying to just display files, and not links nor directories?
ls -la |grep -v "^d" |grep -v "^l"|wc