1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 11:15:24 +02:00
tldr/pages.ar/common/wc.md

29 lines
848 B
Markdown
Raw Normal View History

# wc
> عدّ الأسطر والكلمات والبايتات.
> لمزيد من التفاصيل: <https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html>.
- عدّ جميع الأسطر في ملف:
`wc {{[-l|--lines]}} {{path/to/file}}`
- عدّ جميع الكلمات في ملف:
`wc {{[-w|--words]}} {{path/to/file}}`
- عدّ جميع البايتات في ملف:
`wc {{[-c|--bytes]}} {{path/to/file}}`
- عدّ جميع الأحرف في ملف (مع أخذ الأحرف متعددة البايتات في الاعتبار مثل الحروف العربية):
`wc {{[-m|--chars]}} {{path/to/file}}`
- عدّ جميع الأسطر والكلمات والبايتات من `stdin`:
`{{find .}} | wc`
- حساب طول أطول سطر بعدد الأحرف:
`wc {{[-L|--max-line-length]}} {{path/to/file}}`