Flat the linux interview questions-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. Identify a common user and find the list of all file names in the file system with core:
Search for files and use the find command
Find/-name core-print 2>/dev/null
"2>/dev/null" blocks warning information (why 2, unknown !)
For root users, "2>/dev/null" is not required"
2. A list of IDs of all processes in the system is displayed as follows:
Ps-xh | cut-d ''-f2
Ps-xh | cut-b1-5
3. If it is root?
Root identity. ps-xh shows all system processes. To display root processes, you need to process them. ps-u and grep are used to extract lines starting with root, use cut to retrieve the required columns:
Ps-uxh | grep "^ root" | cut-b10-14
4. Files starting with hda and followed by numbers are displayed in the/dev directory in ascending order of numbers:
Ls is used to display files, and sort-n is used to sort numbers in ascending order, followed by the corresponding columns
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service