
For example, you can check whether a program is running by piping the output of the ps -ef command to a grep filter. The grep command enables you to filter through the output of another command, using piping. …and the following command displays 3 lines before the matched line: grep -B 3 "pattern" logfile Piping output into grep The following command will print 3 lines after the matches. The -B and -A options can be used to display the lines before and after all the matching lines respectively. This can be particularly useful while debugging. Sometimes you may want to see the lines that appear close to the matching lines. grep -v 'arizona' filename Print lines before and after matching lines the following command will output all the lines that don’t contain the word arizona. Grep also allows you to perform an inverse search, i.e.

grep -w 'arizona' * To print lines that don’t match the following command searches the exact word arizona across all the files in the current directory. If you want to look for a whole word, instead of a pattern or a substring, you can use the -w option. Or to find lines that end with the word here: grep 'here$' logfile To match whole words only For example, you can use the following command to search for lines that contain the word error. It allows you to specify a search pattern to match against. Regex search is one of the most powerful features of grep. Let’s look at a few handy use-cases: Matching a regular expression You can format the grep command in endless ways to execute your desired search. Vendor ID: "GenuineIntel" CPUID level 10Įxtended brand string: "Genuine Intel(R) CPU T2400 1.To count the total occurrences of the word ‘ERROR’ in a log file. La commande cpuid peut interroger le CPU pour obtenir des information sur le cpuid : $cpuid The governor "ondemand" may decide which speed to useĬurrent CPU frequency is 1000 MHz (asserted by call to hardware). Si le processeur supporte la gestion de sa fréquence d'horloge, vous pouvez obtenir des informations sur cette fonctionnalité et la configuration courante en utilisant cpufreq-info: cpufreq-infoĬpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006ĬPUs which need to switch frequency at the same time: 0 1Īvailable frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHzĪvailable cpufreq governors: userspace, powersave, ondemand, conservative, performanceĬurrent policy: frequency should be within 1000 MHz and 1.83 GHz. La zone DMI de la carte mère contient des informations sur le CPU et son cache.Ĭonfiguration: Enabled, Socketed, Level 1Ĭonfiguration: Enabled, Socketed, Level 2 L'outil KInfo Center de KDE (Dans le K Menu / System / KInfo Center Info Center, fourni par le paquet kcontrol) contient une section consacrée au processeur. L'outil d'information système de Gnome (Hardinfo dans le Menu Applications/Outils système, fourni par le paquet hardinfo) contient une section consacrée au processeur. Model name : Genuine Intel(R) CPU T2400 1.83GHzįlags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr
Cat proc cpuinfo virtual address plus#
Les utilisateurs de Gnome peuvent installer et utiliser hardinfo, ceux de KDE, kinfocenter.Ĭ'est la manière la plus simple de récupérer de l'information sur le processeur installé dans votre ordinateur (à partir d'un terminal). La méthode avec cpuinfo est disponible sur tous les ordinateurs fonctionnant avec Debian. Translation(s): English - Français - Italiano - Русский
