Hi,
In this part i am going to discuss the issues i faced in UNIX.
These issues will be helpful only for a beginner.
Issue One
1. I want to count the number of files in a direcotry.
2. I had given ls -l wc -l
3. Then the issue starts ie. ls -l will show an extra record total.
4. I want to avoid the total.
Solution One
ls -l grep -v "total" wc -l
Solution Two
ls -l grep ^- wc -l
Solution Three
ls -l wc -l awk {'print $1-1'}
Issue Two
While issuing the ps -ef command it is also showing the ps -ef command which i issued to list the process
Solution
ps -ef grep smon grep -v "grep"
I will be posting new issues faced in future.1
Regards
Salih KM
