Linux System Management file and Directory Management Command test

Source: Internet
Author: User

    1. 1. View the System CPU and Memory the information.

[[email protected] ~]# Cat/proc/cpuinfo ( view CPU)

processor:0

Vendor_id:genuineintel

CPU Family:6

model:142

Model Name:intel (R) Core (TM) i5-7200u CPU @ 2.50GHz

Stepping:9

CPU mhz:2712.000

Cache size:3072kb

Fpu:yes

Fpu_exception:yes

CPUID level:22

Wp:yes

Flags:fpuvme de PSE TSC MSR PAE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 clflush dtsmmx fxsr SSE SSE2 SS Sysca ll NX PDPE1GB rdtscp LM constant_tsc up arch_perfmonpebs BTS xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock PNIPCLMULQDQ ssse3 FMA cx16 pcid sse4_1 sse4_2 x2apic movbe popcnttsc_deadline_timer AES Xsave AVX f16c Rdrand hypervisor LAHF_LM abm3dnowprefetch Ida Arat EPB xsaveopt PLN pts DTS fsgsbase bmi1 avx2 SMEP bmi2invpcid

bogomips:5424.00

Clflush size:64

Cache_alignment:64

Address Sizes:42bits physical, bits virtual

Power Management:

[[email protected] ~]# Cat/proc/meminfo ( view memory)

memtotal:1004412 KB

memfree:904152 KB

buffers:9844 KB

cached:28600 KB

swapcached:0 KB

active:19440 KB

inactive:27952 KB

Active (anon): 8976 KB

Inactive (anon): 196 KB

Active (file): 10464 KB

Inactive (file): 27756 KB

unevictable:0 KB

mlocked:0 KB

swaptotal:1023992 KB

swapfree:1023992 KB

dirty:56 KB

writeback:0 KB

anonpages:8964 KB

mapped:6176 KB

shmem:224 KB

slab:30892 KB

sreclaimable:8848 KB

sunreclaim:22044 KB

kernelstack:592 KB

pagetables:1744 KB

nfs_unstable:0 KB

bounce:0 KB

writebacktmp:0 KB

commitlimit:1526196 KB

committed_as:52656 KB

vmalloctotal:34359738367 KB

vmallocused:153184 KB

vmallocchunk:34359579312 KB

hardwarecorrupted:0 KB

anonhugepages:0 KB

hugepages_total:0

hugepages_free:0

hugepages_rsvd:0

hugepages_surp:0

hugepagesize:2048 KB

directmap4k:6144 KB

directmap2m:1042432 KB

directmap1g:0 KB

    1. 2. will be /etc/passwd files are copied to /root/passwd file.

[email protected] ~]# cp/etc/passwd/root/passwd ( will be /etc/passwd files are copied to /root/passwd file )

Cp:overwrite '/root/passwd '? Y

    1. 3. use a command to create a /test directory, and make the directory /test/user1 , /test/user2 two sub-directories.

[[email protected] ~]# mkdir-p/test/{user1,user2}

[Email protected]/]# tree/test

/test

├──user1

└──user2

    1. 4. will be / etc directory is copied to / tmp directory, and maintain the original permissions.

[Email protected]/]# cp-frp/etc/tmp/

[Email protected]/]# ls/tmp/

etc

    1. 5. in the /root Create an empty file under directory file1 , file2 , File3, complete with a command.

[[email protected]/]# Touch/root/{file1,file2,file3}

[[email protected]/]# ls/root/|grep file

File1

File2

File3

    1. 6. Find /root directory to file the files that begin with, and delete them. Complete with a single command.

[Email protected]/]# find/root/-type f-name "file*" |xargs rm-f

[[email protected]/]# ls/root/|grep file

[Email protected]/]# ls/root/

A b install.log zhou2

Anaconda-ks.cfg c.txt install.log.syslog passwd zhou3

A.txt Eet.txt Zhou4

    1. 7. using the Find , the WC command combined with a pipe character to count How many directories the current Linux system contains.

[Email protected]/]# Find/-type d|wc-l

Find: '/PROC/2700/TASK/2700/FD/5 ': No such file ordirectory

Find: '/PROC/2700/TASK/2700/FDINFO/5 ': No such file ordirectory

Find: '/PROC/2700/FD/5 ': No such file or directory

Find: '/PROC/2700/FDINFO/5 ': No such file or directory

11636

    1. 8. find files in the/boot directory that have a size greater than 1024KB and whose name begins with "Vmlinuz"

[Email protected]/]# find/boot/-size +1024-name "vmlinuz*"

/boot/vmlinuz-2.6.32-431.el6.x86_64

    1. 9. How to view the kernel version

[Email protected]/]# uname-r

2.6.32-431.el6.x86_64

    1. . in CentOS 6.5, how to represent the 2nd logical partition of a third SCSI hard disk

Answer: SDC6

    1. One by one . how to turn off or restart the CentOS 6.5

Answer: Shutdown: halt,poweroff,shutdown-h now

Restart: Reboot,shutdown-r Now


This article from the "Linux" blog, reproduced please contact the author!

Linux System Management file and Directory Management Command test

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.