<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=341777&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [Résolu] Terminal : qui est le plus gros ?]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=341777</link>
		<description><![CDATA[Les sujets les plus récents dans [Résolu] Terminal : qui est le plus gros ?.]]></description>
		<lastBuildDate>Fri, 04 Sep 2009 18:03:17 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2910875#p2910875</link>
			<description><![CDATA[<p>Nickel !!! Marche impec ! <img src="http://forum.ubuntu-fr.org/img/smilies/cool.png" width="15" height="15" alt="cool" /><br />Un grand merci à tous les deux <img src="http://forum.ubuntu-fr.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Fri, 04 Sep 2009 18:03:17 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2910875#p2910875</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909899#p2909899</link>
			<description><![CDATA[<p>Enlèves l&#039;option -L qui suit les liens symboliques et ca devrait aller.</p>]]></description>
			<author><![CDATA[dummy@example.com (gren)]]></author>
			<pubDate>Fri, 04 Sep 2009 05:49:16 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909899#p2909899</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909358#p2909358</link>
			<description><![CDATA[<p>J&#039;ai essayé en tapant :</p><div class="codebox"><pre><code>christophe@totoshika-ubuntu:~$ find -L \( -wholename &quot;*.gvfs*&quot; -prune -o -type f \) -printf &quot;%k %P\n&quot;|sort -nr|head -1</code></pre></div><p>(je veux scanner mon home sauf le dossier &quot;.gvfs/&quot;)<br />et là le terminal s&#039;emballe et me met des tonnes de lignes en continu qui me semblent être tjs les mêmes (il faut que je stoppe le terminal avec CTR+C) : </p><p>find: Boucle détectée dans le système de fichiers ; &quot;&quot;./.wine/dosdevices/z:/sys/devices/platform/dock.0/subsystem/devices/pcspkr/input/input5/subsystem/input0/device/subsystem/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:01/physical_node/subsystem/devices/0000:00:01.0/pci_bus/0000:01/subsystem/0000:00/device/0000:00:12.0/host0/subsystem/devices/host2/scsi_host/host2/subsystem/host4/device/target4:0:0/4:0:0:0/block/sr0/subsystem/loop5/bdi/subsystem/1:5/subsystem&quot;&quot; est dans la même boucle que &quot;./.wine/dosdevices/z:/sys/devices/platform/dock.0/subsystem/devices/pcspkr/input/input5/subsystem/input0/device/subsystem/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:01/physical_node/subsystem/devices/0000:00:01.0/pci_bus/0000:01/subsystem/0000:00/device/0000:00:12.0/host0/subsystem/devices/host2/scsi_host/host2/subsystem/host4/device/target4:0:0/4:0:0:0/block/sr0/subsystem/loop5/bdi/subsystem&quot;.<br />...<br />???</p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Thu, 03 Sep 2009 19:25:19 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909358#p2909358</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909175#p2909175</link>
			<description><![CDATA[<div class="codebox"><pre><code>find -L \( -wholename &quot;*&lt;Nom du dossier&gt;*&quot; -prune -o -type f \) -printf &quot;%k %P\n&quot;|sort -nr|head -1</code></pre></div><p>Note : j&#039;ai ajouté l&#039;option -L car j&#039;avais des dossiers de type &quot;liens symboliques&quot;<br />tu peux l&#039;enlever si tu veux</p>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Thu, 03 Sep 2009 17:15:31 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909175#p2909175</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909090#p2909090</link>
			<description><![CDATA[<p>J&#039;ai regardé dans les forums l&#039;utilisation de -prune. Mais je ne suis pas arrivé à insérer cette fonction dans la ligne de commande précédente et ce malgré de nombreux essais. Tant pis.<br />Merci quand même.</p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Thu, 03 Sep 2009 16:20:55 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2909090#p2909090</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908999#p2908999</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>oui ce que j&#039;aimerai connaître c&#039;est le fichier le plus volumineux contenu dans un dossier pouvant lui même contenir des dossiers...</p></div></blockquote></div><p>Ok je crois avoir inversé les deux questions, la prochaine fois penses à faire un topic par question comme il se doit sur ce forum. Merci</p><div class="quotebox"><blockquote><div><p>Je viens d&#039;essayer ta ligne pour le fichier le plus volumineux. Même si cela ne me donne pas sa valeur (poids), cela me trouve bien le fichier avec son arborescence.</p></div></blockquote></div><p>Au pire si ca te donne juste le nom de fichier tu peux toujours utiliser mon script et changer les options du find (la ou j&#039;ai mis <strong>find -type d</strong>)</p><p>D&#039;ailleurs ya surement moyen de passer par xargs pour simplifier mon script en une ligne de commande.</p><div class="quotebox"><blockquote><div><p>Bref merci à toi et à Hawkmoon et Gren pour votre aide</p></div></blockquote></div><p>Pas de problème.</p>]]></description>
			<author><![CDATA[dummy@example.com (gren)]]></author>
			<pubDate>Thu, 03 Sep 2009 15:26:06 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908999#p2908999</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908863#p2908863</link>
			<description><![CDATA[<p>oui, je te laisse regarder les options -wholename et -prune de la commande find.</p>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Thu, 03 Sep 2009 13:46:58 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908863#p2908863</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908820#p2908820</link>
			<description><![CDATA[<p>Heu...juste une dernière question (promis j&#039;arrête après <img src="http://forum.ubuntu-fr.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" />)<br />En utilisant : </p><div class="codebox"><pre><code>find -type f -printf &quot;%k %P\n&quot;|sort -nr|head -1|cut -d&#039; &#039; -f 2-</code></pre></div><p>ou</p><div class="codebox"><pre><code>find -type f -printf &quot;%k %P\n&quot;|sort -nr|head -1</code></pre></div><p>est-il possible de rajouter une commande pour exclure un sous-dossiers spécifique de la recherche...je sais, je sais...:lol:</p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Thu, 03 Sep 2009 13:24:16 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908820#p2908820</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908817#p2908817</link>
			<description><![CDATA[<p>pour le &quot;poids&quot; (exprimé en ko) :</p><div class="codebox"><pre><code>find -type f -printf &quot;%k %P\n&quot;|sort -nr|head -1</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Thu, 03 Sep 2009 13:20:38 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908817#p2908817</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908811#p2908811</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>[...] Comment faire apparaître dans le terminal le fichier le plus volumineux d&#039;un dossier (pouvant contenir des sous-dossiers par ailleurs) ?[...]</p></div></blockquote></div><p><img src="http://forum.ubuntu-fr.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> oui ce que j&#039;aimerai connaître c&#039;est le <span class="bbu">fichier</span> le plus volumineux contenu dans un dossier pouvant lui même contenir des dossiers...et donc le fichier recherché peut se trouver dans l&#039;un de ces sous-dossiers. Suis-je plus clair <img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /> ?</p><p>Concernant le code </p><div class="codebox"><pre><code>du -ah | sort -rn |more</code></pre></div><p>effectivement ! Mais l&#039;erreur vient de moi et non de Hawkmoon ou de Gren. Connaissant le paramètre &quot;h&quot;, j&#039;ai voulu l&#039;employer pour que cela plus facilement lisible, mais ne comprenant pas tout le reste de la ligne de code, je n&#039;avais pas compris que cela pouvait avoir une incidence <img src="http://forum.ubuntu-fr.org/img/smilies/yikes.png" width="15" height="15" alt="yikes" /></p><p>Je viens d&#039;essayer ta ligne pour le fichier le plus volumineux. Même si cela ne me donne pas sa valeur (poids), cela me trouve bien le fichier avec son arborescence.<br />Bref merci à toi et à Hawkmoon et Gren pour votre aide <img src="http://forum.ubuntu-fr.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>Sympa le Terminal mais pfff au début c&#039;est qd même pas évident <img src="http://forum.ubuntu-fr.org/img/smilies/roll.png" width="15" height="15" alt="roll" /></p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Thu, 03 Sep 2009 13:19:08 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908811#p2908811</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908761#p2908761</link>
			<description><![CDATA[<div class="quotebox"><cite>gren a écrit&#160;:</cite><blockquote><div><p>C&#039;est justement ce qu&#039;il veut : trier par taille de dossier.</p></div></blockquote></div><p>On ne doit pas comprendre de la même façon :</p><div class="quotebox"><cite>krzyzstof a écrit&#160;:</cite><blockquote><div><p>[...]<br />Comment faire apparaître dans le terminal le fichier le plus volumineux d&#039;un dossier (pouvant contenir des sous-dossiers par ailleurs) ?[...]</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Thu, 03 Sep 2009 12:35:19 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908761#p2908761</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908752#p2908752</link>
			<description><![CDATA[<div class="quotebox"><cite>Totor a écrit&#160;:</cite><blockquote><div><div class="quotebox"><cite>gren a écrit&#160;:</cite><blockquote><div><div class="codebox"><pre><code>#!/bin/bash

#pour indiquer que mon séparateur est le retour à la ligne
IFS=&#039;
&#039;

#boucle parcourant tous les dossiers et affichant la taille et le nom pour chacun
for i in $(find -type d)
do
    du -s &quot;$i&quot;
done

#au cas ou
unset IFS</code></pre></div></div></blockquote></div><p>Erreur, cela donne le dossier le plus gros mais pas le fichier le plus gros.<br />Voilà une solution :</p><div class="codebox"><pre><code>find -type f -printf &quot;%k %P\n&quot;|sort -nr|head -1|cut -d&#039; &#039; -f 2-</code></pre></div></div></blockquote></div><p>Erreur ? Je crois pas non.<br />C&#039;est justement ce qu&#039;il veut : trier par taille de dossier.</p><br /><p>Autrement oui |more fonctionne ou alors |less</p>]]></description>
			<author><![CDATA[dummy@example.com (gren)]]></author>
			<pubDate>Thu, 03 Sep 2009 12:26:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908752#p2908752</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908698#p2908698</link>
			<description><![CDATA[<div class="quotebox"><cite>gren a écrit&#160;:</cite><blockquote><div><p>Pour la deuxième question:</p><p>Tu crée un fichier script <strong>list_dir_size.sh</strong> avec :</p><div class="codebox"><pre><code>#!/bin/bash

#pour indiquer que mon séparateur est le retour à la ligne
IFS=&#039;
&#039;

#boucle parcourant tous les dossiers et affichant la taille et le nom pour chacun
for i in $(find -type d)
do
    du -s &quot;$i&quot;
done

#au cas ou
unset IFS</code></pre></div></div></blockquote></div><p>Erreur, cela donne le dossier le plus gros mais pas le fichier le plus gros.<br />Voilà une solution :</p><div class="codebox"><pre><code>find -type f -printf &quot;%k %P\n&quot;|sort -nr|head -1|cut -d&#039; &#039; -f 2-</code></pre></div><p>Note : </p><div class="quotebox"><cite>krzyzstof a écrit&#160;:</cite><blockquote><div><p>@ Hawkmoon : Merci cela marche nickel le : </p><div class="codebox"><pre><code>du -ah | sort -rn |more</code></pre></div></div></blockquote></div><p>ça m&#039;étonnerai ...<br />l&#039;option -h donne les résultats au format &quot;humain&quot;.<br />Donc, tu peux très bien avoir :<br />4k fichier2<br />1,1G fichier1</p><p>ce qui est totalement erroné par rapport à ta demande...</p>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Thu, 03 Sep 2009 11:58:50 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908698#p2908698</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908640#p2908640</link>
			<description><![CDATA[<p>@ xabilon : désolé j&#039;avais pas vu qu&#039;il y avait un forum spécial <img src="http://forum.ubuntu-fr.org/img/smilies/yikes.png" width="15" height="15" alt="yikes" />. Merci<br />@ Hawkmoon : Merci cela marche nickel le : </p><div class="codebox"><pre><code>du -ah | sort -rn |more</code></pre></div><p><img src="http://forum.ubuntu-fr.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (krzyzstof)]]></author>
			<pubDate>Thu, 03 Sep 2009 11:21:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908640#p2908640</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Résolu] Terminal : qui est le plus gros ?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908625#p2908625</link>
			<description><![CDATA[<p>Déplacé dans &quot;Console&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (xabilon)]]></author>
			<pubDate>Thu, 03 Sep 2009 11:08:14 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=2908625#p2908625</guid>
		</item>
	</channel>
</rss>
