« Commandes BASH » : différence entre les versions

 
(4 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
[http://tools.marmits.com/testcideo/dedie/chmod/info.php chmod]<br />
[http://tools.marmits.com/testcideo/dedie/chmod/info.php chmod]<br />
== Processeur ==
Informations sur le processeur
<syntaxhighlight lang="bash" line copy>
lscpu
</syntaxhighlight>
Pour un affichage plus simple
<syntaxhighlight lang="bash" line copy>
lscpu | grep -E "Model name|CPU\(s\)|Thread|Core|Socket|Virtualization"
</syntaxhighlight>


== Ressources ==
== Ressources ==
Ligne 139 : Ligne 150 :
</syntaxhighlight>
</syntaxhighlight>
* http://jlbicquelet.free.fr/aix/commandes/lsof.php
* http://jlbicquelet.free.fr/aix/commandes/lsof.php
=== [[Grep| Grep]] ===


== sudo ==
== sudo ==
Ligne 341 : Ligne 354 :
chmod -R 755 repertoire
chmod -R 755 repertoire
</syntaxhighlight>
</syntaxhighlight>
-----
=== Affiche la structure d'un dossier ===
<code>tree</code> parcourt récursivement un répertoire et affiche son contenu (dossiers et fichiers) dans une représentation hiérarchique, en utilisant des indentations et des symboles (<code>├─</code>, <code>└─</code>) pour montrer la structure.
==== ✅ '''Syntaxe de base'''====
<syntaxhighlight lang="bash">tree [options] [répertoire]</syntaxhighlight>
* '''Sans argument''' : affiche l’arborescence du répertoire courant.
* '''Avec un chemin''' : affiche l’arborescence du répertoire spécifié.
==== ✅ '''Options utiles''' ====
* <code>-L &lt;niveau&gt;</code> : limite la profondeur d’affichage (ex. <code>-L 2</code> pour 2 niveaux).
* <code>-d</code> : affiche uniquement les dossiers.
* <code>-f</code> : affiche le chemin complet des fichiers.
* <code>-a</code> : inclut les fichiers cachés.
* <code>--dirsfirst</code> : liste les dossiers avant les fichiers.
==== ✅ '''Exemple''' ====
<syntaxhighlight lang="bash">tree -L 2 project</syntaxhighlight>
* Affiche la structure du dossier <code>project</code> avec une profondeur de 2 niveaux.
<pre>project/
├─ public/
│  ├─ index.html
│  ├─ script.js
├─ src/
│  └─ app.php
├─ db/
│  └─ schema.sql
└─ README.md</pre>
* Exclure .git et .idea
<syntaxhighlight lang="bash">tree -a -I '.git|.idea'</syntaxhighlight>
-----


== MySql ==
== MySql ==