文件操作 - cact-execution.xml
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/help/de/caja-actions-config-tool/cact-execution.xml
编辑文件内容
<?xml version="1.0" encoding="utf-8"?> <sect2 id="usage-execution"> <title>Welche Aktion soll ausgeführt werden?</title> <para>Wahrscheinlich möchten Sie, dass Ihre Aktion letztendlich etwas ausführt. Tatsächlich ist eine der wenigen Voraussetzungen für die Gültigkeit einer Aktion, dass diese etwas ausführen soll.</para> <para> As we have already seen, the command to be executed is configured <!-- i18n: "Command" is a UI label --> in the <guilabel>Command</guilabel> page. </para> <para>Dieser Befehl kann Argumente annehmen, die wiederum eingebettete Parameter enthalten dürfen. Diese werden zur Ausführungszeit mit Werten erweitert, die von den gewählten Objekt(en) abhängen.</para> <sect3 id="usage-execution-parameters"> <title>Verfügbare Parameter</title> <para> <!-- i18n: "Command" is a UI label --> In the <guilabel>Command</guilabel> page, <!-- i18n: "Legend" is a UI label --> click on <guilabel>Legend</guilabel> button to see the list of available parameters. </para> <figure id="cact-FIG-legend"> <title>Liste der verfügbaren Parameter</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-legend.png" format="PNG"/> </imageobject> <textobject> <phrase>Zeigt eine Liste der verfügbaren Parameter.</phrase> </textobject> </mediaobject> </screenshot> </figure> <tip> <para> <!-- i18n: "Legend" is a UI label --> The <guibutton>Legend</guibutton> button has a toggling action: <!-- i18n: "Parameter Legend" is a UI label --> click once to display the <guilabel>Parameter Legend</guilabel> dialog box; click a second time to hide it. </para> </tip> <note> <para> <!-- i18n: "first" is a UI label --> The word « <guilabel>first</guilabel> » may be misleading as it only refers to the list of selected items internally provided by the file manager to the <productname>Caja-Actions</productname> plugin. </para> <para> In particular, it has <emphasis>nothing to do</emphasis> with the visual selection you may have done in the file manager window. <!-- i18n: "first" is a UI label --> And, in fact, which is the « <guilabel>first</guilabel> » selected item in a multiple selection is absolutely undefined and rather unpredictable. </para> </note> </sect3> <sect3 id="usage-execution-work"> <title>Wo soll die Aktion ausgeführt werden?</title> <para>Ihre Aktion kann in einem bestimmten Arbeitsordner ausgeführt werden.</para> <para> <!-- i18n: "Command" is a UI label --> You may specify it in the <guilabel>Command</guilabel> tab, in the <!-- i18n: "Working directory" is a UI label --> <guilabel>Working directory</guilabel> entry box, or by clicking <!-- i18n: "Browse" is a UI (button) label --> on <guibutton>Browse</guibutton> to select a folder on the filesystem. </para> <figure id="cact-FIG-work-dir-frame"> <title>Feld für Arbeitsordner</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-working-directory-frame.png" format="PNG"/> </imageobject> <textobject> <phrase>Fokussieren Sie auf das Feld zur Wahl des Arbeitsordners.</phrase> </textobject> </mediaobject> </screenshot> </figure> <para> The working directory defaults to <literal>%d</literal>, which runs the command in the base directory of the (first) selected item. </para> <para> In the particular case of the <literal>%d</literal> parameter, <!-- i18n: "first" is a UI label --> the « <guilabel>first</guilabel> » selected item is not very important because it is very likely that all selected items are located in the same base directory. </para> </sect3> <sect3 id="usage-execution-how"> <title>Wie soll die Aktion ausgeführt werden?</title> <para> Apart from configuring the conditions, the selection must be met in order your action be displayed in file manager menus, <productname>Caja-Actions</productname> allows you to configure how exactly your command will be executed. </para> <para> <!-- i18n: "Execution" is a UI label --> Click on the <guilabel>Execution</guilabel> tab to show the page which configures the execution of your command. </para> <figure id="cact-FIG-execution"> <title>Konfiguration der Ausführungsmodi</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-execution-tab.png" format="PNG"/> </imageobject> <textobject> <phrase>Zeigt die Konfiguration der Ausführungsmodi eines Befehls.</phrase> </textobject> </mediaobject> </screenshot> </figure> <sect4 id="usage-execution-how-mode"> <title>Ausführungsmodus</title> <figure id="cact-FIG-execution-mode"> <title>Konfiguration des Ausführungsmodus</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-exec-mode-frame.png" format="PNG"/> </imageobject> <textobject> <phrase>Fokussieren Sie das Feld für den Ausführungsmodus.</phrase> </textobject> </mediaobject> </screenshot> </figure> <para>Der Ausführungsmodus Ihres Befehls kann aus folgenden Werten gewählt werden:</para> <variablelist> <varlistentry> <term>Normal</term> <listitem> <para>Startet den Befehl als normale grafische Benutzeroberfläche.</para> </listitem> </varlistentry> <varlistentry> <term>Terminal</term> <listitem> <para>Startet das bevorzugte Terminal der Arbeitsumgebung und führt den Befehl darin aus.</para> </listitem> </varlistentry> <varlistentry> <term>Eingebettet</term> <listitem> <para>Nutzt ein spezielles Funktionsmerkmal des Dateimanagers, wodurch ein Terminal in diesem ausgeführt wird.</para> <para> As <productname>Caja</productname> does not have this feature, this option is strictly equivalent to <literal>Terminal</literal> option. </para> </listitem> </varlistentry> <varlistentry> <term>Ausgabe anzeigen</term> <listitem> <para>Startet das bevorzugte Terminal der Arbeitsumgebung und führt den Befehl darin aus. Am Ende werden die Standardkanäle (stdout, stderr) ausgelesen und angezeigt.</para> </listitem> </varlistentry> </variablelist> <para> The execution mode of a command defaults to <literal>Normal</literal>. That is, the command is executed without any particular pre- or post-work. </para> </sect4> <sect4 id="usage-execution-how-notify"> <title>Start-Rückmeldungen</title> <figure id="cact-FIG-startup-mode"> <title>Konfiguration der Startmodi</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-startup-mode-frame.png" format="PNG"/> </imageobject> <textobject> <phrase>Fokussieren Sie das Feld für den Startmodus.</phrase> </textobject> </mediaobject> </screenshot> </figure> <para> If the execution mode of the command is <literal>Normal</literal>, <!-- i18n: "remove" is a X literal, do not translate --> and if you know that the application will send a <literal>remove</literal> message with the <envar>DESKTOP_STARTUP_ID</envar> environment variable set, <!-- i18n: "Startup notify" is a UI label --> then check the <guilabel>Startup notify</guilabel> checkbox. </para> <para>See the <ulink url="http://www.freedesktop.org/Standards/startup-notification-spec" type="http"><citetitle>Startup Notification Protocol Specification</citetitle></ulink> for more details.</para> </sect4> <sect4 id="usage-execution-how-class"> <title>Fensterklasse</title> <para> If the execution mode of the command is <literal>Normal</literal>, and if you know that the application will map at least one window with a given class name, then enter that name into the <!-- i18n: "Startup Window Manager class" is a UI label --> <guilabel>Startup Window Manager class</guilabel> entry box. </para> <para>See the <ulink url="http://www.freedesktop.org/Standards/startup-notification-spec" type="http"><citetitle>Startup Notification Protocol Specification</citetitle></ulink> for more details.</para> </sect4> <sect4 id="usage-execution-how-user"> <title>Befehlsausführer</title> <figure id="cact-FIG-execute-as"> <title>Konfiguration des Besitzers der Ausführung</title> <screenshot> <mediaobject> <imageobject> <imagedata fileref="figures/cact-execute-as-frame.png" format="PNG"/> </imageobject> <textobject> <phrase>Focus on the <guilabel>Execute as</guilabel> frame.</phrase> </textobject> </mediaobject> </screenshot> </figure> <para> Enter in the <guilabel>Execute as user</guilabel> entry box the username or the <acronym>UID</acronym> of the user your command will be run as. </para> <para>Falls Sie nichts in diesem Feld eingeben, dann wird der Befehl unter dem Kennzeichen des aktuellen Benutzers ausgeführt.</para> </sect4> <sect4 id="usage-execution-how-singular"> <title>Mehrfache Ausführung</title> <para>Sie möchten möglicherweise den Befehl nur einmal ausführen, mit der Liste aller ausgewählten Objekte als Argument.</para> <para>Sie möchten möglicherweise den Befehl für jedes gewählte Objekt ausführen, jeweils mit einem unterschiedlichen Argument für jede Ausführung.</para> <para> Actually, <productname>Caja-Actions</productname> automatically handles these two behaviors, depending of the form and the order of the parameters in the command arguments. </para> <para> Though some parameters are not depending on the count of the selection (<abbrev>e.g.</abbrev> « <literal>%c</literal> », the selection count itself), most have two declensions: </para> <itemizedlist> <listitem> <para> a « singular » one, <abbrev>e.g.</abbrev> « <literal>%b</literal> », the basename of the selected item; </para> </listitem> <listitem> <para> a « plural » one, <abbrev>e.g.</abbrev> « <literal>%B</literal> », the space-separated list of the basenames of selected items. </para> </listitem> </itemizedlist> <para>Falls die Auswahl leer ist oder nur ein Element enthält, dann sind diese zwei Formen genau gleich.</para> <para>Falls die Auswahl mehr als ein Objekt enthält:</para> <itemizedlist> <listitem> <para> if the first relevant parameter is of a singular form, then <productname>Caja-Actions</productname> will consider that the command is only able to deal with one item at a time, and thus that it has to be ran one time for each selected item; </para> </listitem> <listitem> <para> contrarily, if the first relevant parameter found is of the plural form, then <productname>Caja-Actions</productname> will consider that the command is able to deal with a list of items, and thus the command will be executed only once; </para> </listitem> <listitem> <para> if all found parameters are irrelevant, then <productname>Caja-Actions</productname> defaults to consider that the command should be executed only once. </para> </listitem> </itemizedlist> <table id="cact-TAB-multiple-execution" frame="all" tocentry="1"> <title>Characterization of the parameters <abbrev>vs.</abbrev> multiple execution</title> <tgroup cols="5"> <colspec align="center" colwidth="*"/> <colspec align="left" colwidth="5*"/> <colspec align="center" colwidth="*" colname="c3"/> <colspec align="center" colwidth="*"/> <colspec align="center" colwidth="*" colname="c5"/> <thead> <row> <entry>Parameter</entry> <entry>Beschreibung</entry> <entry namest="c3" nameend="c5">Wiederholung</entry> </row> </thead> <tbody> <row> <entry><literal>%b</literal></entry> <entry>(erster) Basisname</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%B</literal></entry> <entry>Durch Leerzeichen getrennte Liste von Basisnamen</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%c</literal></entry> <entry>Anzahl der ausgewählte Objekte</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> <row> <entry><literal>%d</literal></entry> <entry>(erster) Basisordner</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%D</literal></entry> <entry>Durch Leerzeichen getrennte Liste von Ordner-Basisnamen der ausgewählten Objekte</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%f</literal></entry> <entry>(erster) Dateiname</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%F</literal></entry> <entry>Durch Leerzeichen getrennte Liste der gewählten Dateinamen</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%h</literal></entry> <entry>Rechnername der (ersten) Adresse</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> <row> <entry><literal>%m</literal></entry> <entry>MIME-Typ des (ersten) ausgewählten Eintrags</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%M</literal></entry> <entry>Durch Leerzeichen getrennte Liste der MIME-Typen der gewählten Objekte</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%n</literal></entry> <entry>Benutzername der (ersten) Adresse</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> <row> <entry><literal>%o</literal></entry> <entry>»no-op« Operator, der eine einfache Form der Ausführung erzwingt.</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%O</literal></entry> <entry>»no-op« Operator, der eine mehrfache Form der Ausführung erzwingt.</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%p</literal></entry> <entry>Portnummer der (ersten) Adresse</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> <row> <entry><literal>%s</literal></entry> <entry>Schema der (ersten) Adresse</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> <row> <entry><literal>%u</literal></entry> <entry>(erste) Adresse</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%U</literal></entry> <entry>Durch Leerzeichen getrennte Liste der gewählten Adressen</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%w</literal></entry> <entry>(erster) Basisname ohne Erweiterung</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%W</literal></entry> <entry>Durch Leerzeichen getrennte Liste der Basisnamen ohne deren Erweiterung</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%x</literal></entry> <entry>(erste) Erweiterung</entry> <entry>Singular</entry> <entry/> <entry/> </row> <row> <entry><literal>%X</literal></entry> <entry>Durch Leerzeichen getrennte Liste von Erweiterungen</entry> <entry/> <entry/> <entry>Plural</entry> </row> <row> <entry><literal>%%</literal></entry> <entry>the « <literal>%</literal> » character</entry> <entry/> <entry>irrelevant</entry> <entry/> </row> </tbody> </tgroup> </table> <example> <title>Usage of singular <abbrev>vs.</abbrev> plural forms</title> <para> Say the current folder is <filename>/data</filename>, and the current selection contains the three files <filename>pierre</filename>, <filename>paul</filename> and <filename>jacques</filename>. </para> <formalpara> <title> If we have requested <command>echo %b</command>, </title> <para>dann werden die folgenden Befehle erfolgreich ausgeführt:</para> </formalpara> <simplelist> <member><command>echo pierre</command></member> <member><command>echo paul</command></member> <member><command>echo jacques</command></member> </simplelist> <para> This is because <literal>%b</literal> marks a <emphasis>singular</emphasis> parameter. The command is then run once for each of the selected items. </para> <formalpara> <title> Contrarily, if we have requested <command>echo %B</command>, </title> <para>dann wird der folgende Befehl ausgeführt:</para> </formalpara> <simplelist> <member><command>echo pierre paul jacques</command></member> </simplelist> <para> This is because <literal>%B</literal> marks a <emphasis>plural</emphasis> parameter. The command is then run only once, with the list of selected items as arguments. </para> <formalpara> <title> If we have requested <command>echo %b %B</command>, </title> <para>dann werden die folgenden Befehle erfolgreich ausgeführt:</para> </formalpara> <simplelist> <member><command>echo pierre pierre paul jacques</command></member> <member><command>echo paul pierre paul jacques</command></member> <member><command>echo jacques pierre paul jacques</command></member> </simplelist> <para> This is because the first <emphasis>relevant</emphasis> parameter is <literal>%b</literal>, and so the command is run once for each selected item, replacing at each occurrence the <literal>%b</literal> parameter with the corresponding item. The second parameter is computed and added as arguments to the executed command. </para> <formalpara> <title> And if we have requested <literal>echo %B %b</literal>, </title> <para>dann werden die folgenden Befehle ausgeführt:</para> </formalpara> <simplelist> <member><command>echo pierre paul jacques pierre</command></member> </simplelist> <para> This is because the first <emphasis>relevant</emphasis> parameter here is <literal>%B</literal>. The command is then run only once, replacing <literal>%B</literal> with the space-separated list of basenames. As the command is only run once, the <literal>%b</literal> is substituted only once with the (first) basename. </para> </example> </sect4> </sect3> </sect2>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件