www.archive-org-2014.com » ORG » G » GRML

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

    Archived pages: 58 . Archive date: 2014-01.

  • Title: cheatcodes
    Descriptive info: cheatcodes..

    Original link path: /cheatcodes/
    Open archive

  • Title: cheatcodes
    Original link path: /mailinglist/
    (No additional info available in detailed archive for this subpage)

  • Title: GRMLZSHRC
    Descriptive info: GRMLZSHRC.. July, 2011.. NAME.. grmlzshrc - Grml's zsh setup.. SYNOPSIS.. zsh.. [.. options.. ].. DESCRIPTION.. The Grml project provides a fairly exhaustive interactive setup (referred to as.. grmlzshrc.. throughout this document) for the amazing unix shell zsh (.. http://zsh.. sourceforge.. net.. ).. This is the reference manual for that setup.. To use.. , you need at least version 3.. 1.. 7 of zsh (although not all features are enabled in every version).. behaves differently depending on which user loads it.. For the root user (.. EUID.. == 0) only a subset of features is loaded by default.. This behaviour can be altered by setting the.. GRML_ALWAYS_LOAD_ALL.. STARTUP VARIABLE (see below).. Users may want to keep an up-to-date version of the setup (possibly from the git-sources) in.. ~/.. zshrc.. If that happens on a system where the global zshrc is also a.. (but possibly an older one), you can inhibit loading the global version by doing:.. echo setopt no_global_rcs ~/.. zshenv.. Note, that this will disable.. ANY.. global files, except for the global zshenv file.. STARTUP VARIABLES.. Some of the behaviour of.. can be altered by setting certain shell variables.. These may be set temporarily when starting zsh like this:.. % BATTERY=1 zsh.. Or by setting them permanently in.. zshrc.. pre.. (See AUXILIARY FILES below).. BATTERY.. If set to a value greater than zero and.. acpi.. installed,.. will put the battery status into the right hand side interactive prompt.. COMMAND_NOT_FOUND.. A non zero value activates a handler, which is called when a command can not be found.. The handler is defined by GRML_ZSH_CNF_HANDLER (see below).. GRML_ZSH_CNF_HANDLER.. This variable contains the handler to be used by COMMAND_NOT_FOUND (see above) and defaults to "/usr/share/command-not-found/command-not-found".. GRMLSMALL_SPECIFIC.. Set this to zero to remove items in zsh config, which do not work in grml-small.. HISTFILE.. Where zsh saves the history.. Default: ${HOME}/.. zsh_history.. HISTSIZE.. Number of commands to be kept in the history.. On a Grml-CD this defaults to 500, on a hard disk installation to 5000.. MAILCHECK.. Sets the frequency in seconds for zsh to check for new mail.. Defaults to 30.. A value of zero turns off checking.. NOCOR.. Non zero values deactivate automatic correction of commands.. NOMENU.. If set to zero (default), allows selection from a menu, if there are at least five possible options of completion.. NOPRECMD.. A non zero value disables precmd and preexec commands.. These are functions that are run before every command (setting xterm/screen titles etc.. ).. REPORTTIME.. Show time (user, system and cpu) used by external commands, if they run longer than the defined number of seconds (default: 5).. SAVEHIST.. Number of commands to be stored in ${HISTFILE}.. Defaults to 1000 on a Grml-CD and to 10000 on an installation on hard disk.. watch.. As in tcsh(1) an array of login/logout events to be reported by the shell builtin "log".. For details see zshparam(1).. Defaults to (notme root).. ZSH_NO_DEFAULT_LOCALE.. Import "/etc/default/locale", if set to zero (default).. ZSH_PROFILE_RC.. A non zero value causes shell functions to be profiled.. The results can be obtained with the zprof builtin command (see zshmodules(1) for details).. FEATURE DESCRIPTION.. This is an in depth description of non-standard features implemented by.. DIRSTACK HANDLING.. The dirstack in.. has a persistent nature.. It is stored into a file each time zsh's working directory is changed.. That file can be configured via the.. DIRSTACKFILE.. variable and it defaults to.. zdirs.. The.. DIRSTACKSIZE.. variable defaults to.. 20.. in this setup.. is loaded each time zsh starts, therefore freshly started zshs inherit the dirstack of the zsh that most recently updated.. DIRECTORY BASED PROFILES.. If you need to perform certain actions each time you enter certain directory-trees, this is the feature you are looking for.. Initialisation.. To initialise the system, you need to call the function `chpwd_profiles' at some point in your `zshrc.. local'; preferably.. after.. you configured the system.. The configuration of the system is described further below.. If you need to do initialisations the first time `chpwd_profiles' is called (which should be in your configuration file), you can do that in a function called "chpwd_profiles_init".. That function needs to be defined.. before.. `chpwd_profiles' is called for this to work.. During the.. first.. call of `chpwd_profiles' (and therefore all its profile functions) the parameter `$CHPWD_PROFILES_INIT' exists and is set to `1'.. In all other cases, the parameter does not exist at all.. Styles and Profile-names.. To store its configuration, the system uses.. functions.. and.. styles.. (zsh's context sensitive configuration system), such as this:.. zstyle ':chpwd:profiles:/usr/src/grml(|/|/*)' profile grml zstyle ':chpwd:profiles:/usr/src/debian(|/|/*)' profile debian.. When that's done and you enter a directory that matches the pattern in the third part of the context, a function called chpwd_profile_grml, for example, is called (if it exists).. If no pattern matches (read: no profile is detected) the profile is set to 'default', which means chpwd_profile_default is attempted to be called.. A word about the context (the ':chpwd:profiles:*' stuff in the zstyle command) which is used: The third part in the context is matched against ${PWD}.. That's why using a pattern such as /foo/bar(|/|/*) makes sense.. Because that way the profile is detected for all these values of ${PWD}:.. /foo/bar /foo/bar/ /foo/bar/baz.. So, if you want to make double damn sure a profile works in /foo/bar and everywhere deeper in that tree, just use (|/|/*) and be happy.. The name of the detected profile will be available in a variable called 'profile' in your functions.. You don't need to do anything, it'll just be there.. Controlling Profile Execution.. During its initialisation run, the system creates a parameter $CHPWD_PROFILE, which is set to the profile that was is currently active (the default value is "default").. That way you can avoid running code for a profile that is already active, by running code such as the following at the start of your function:.. function chpwd_profile_grml() { [[ ${profile} == ${CHPWD_PROFILE} ]] return 1.. }.. If you know you are going to do that all the time for each and every directory-profile function you are ever going to write, you may also set the `re-execute' style to `false' (which only defaults to `true' for backwards compatibility), like this:.. zstyle ':chpwd:profiles:*' re-execute false.. Signaling availabily/profile changes.. If you use this feature and need to know whether it is active in your current shell, there are several ways to do that.. Here are two simple ways:.. a) If knowing if the profiles feature is active when zsh starts is good enough for you, you can use the following snippet:.. (( ${+functions[chpwd_profiles]} )) print "directory profiles active".. b) If that is not good enough, and you would prefer to be notified whenever a profile changes, you can solve that by making sure you start.. every.. profile function you create like this:.. function chpwd_profile_myprofilename() { [[ ${profile} == ${CHPWD_PROFILE} ]] return 1 print "chpwd(): Switching to profile: $profile".. That makes sure you only get notified if a profile is.. changed.. , not everytime you change directory.. (To avoid this, you may also set the newer `re-execute' style like described further above instead of the test on top of the function.. Leaving Profiles.. When the system switches from one profile to another, it executes a function named "chpwd_leave_profile_ PREVIOUS-PROFILE-NAME ()" before calling the profile-function for the new profile.. Version requirement.. This feature requires zsh.. 4.. 3.. or newer.. ACCEPTLINE WRAPPER.. accept-line.. wiget is the one that is taking action when the.. return.. key is hit.. uses a wrapper around that widget, which adds new functionality.. This wrapper is configured via styles.. That means, you issue commands, that look like:.. zstyle 'context' style value.. The context namespace, that we are using is 'acceptline'.. That means, the actual context for your commands look like:.. ':acceptline: subcontext '.. Where.. subcontext.. is one of:.. default.. ,.. normal.. force.. misc.. or.. empty.. Recognized Contexts.. This is the value, the context is initialized with.. compwarnfmt and //rehash.. styles are looked up in this context.. If the first word in the command line is either a command, alias, function, builtin or reserved word, you are in this context.. This is the context, that is used if you hit enter again, after being warned about the existence of a _completion for the non-existing command you entered.. This is the context, you are in if the command line is empty or only consists of whitespace.. This context is in effect, if you entered something that does not match any of the above.. (e.. g.. : variable assignments).. Available Styles.. nocompwarn.. If you set this style to true, the warning about non existent commands, for which completions exist will not be issued.. (Default:.. false.. ).. compwarnfmt.. The message, that is displayed to warn about the _completion issue.. (default:.. '%c will not execute and completion %f exists.. '.. ) '%c' is replaced by the command name, '%f' by the completion's name.. rehash.. If this is set, we'll force rehashing, if appropriate.. (Defaults to.. true.. in.. actions.. This can be a list of wigdets to call in a given context.. If you need a specific order for these to be called, name them accordingly.. The default value is an.. empty list.. default_action.. The name of a widget, that is called after the widgets from 'actions'.. By default, this will be '.. accept-line' (which is the built-in accept-line widget).. call_default.. If true in the current context, call the widget in the 'default_action' style.. (The default is.. in all contexts.. ).. PROMPT.. now supplies three prompt themes compatible with zsh's.. promptinit.. system.. The three themes are called.. grml.. grml-large.. grml-chroot.. By default,.. is used, unless.. $GRMLPROMPT.. is set to a value larger than zero, in which case.. is used.. Lastly, if.. $GRML_CHROOT.. is non-empty,.. As usual, with promtinit themes, the user may switch to a different theme using the.. prompt.. utility:.. prompt grml-large.. That will use the.. prompt theme.. The themes are highly customisable.. The main source of documentation about customisation is the main.. theme's doc-string, that is available via the following command:.. prompt -h grml.. The other themes also come with doc-strings, but the main theme's is the canonical reference about all of them.. This feature requires version.. 7.. of the shell.. Older versions will use the classic grml prompt as a fallback.. A note to people who like customisation: If you are.. not.. using a prompt theme for your customisation, but you're either statically setting $PS1 (or $PROMPT) or you're constructing one of those variables in zsh's \`precmd()' function, make sure you are turning the zsh's prompt theme system.. off.. before doing so.. A correct example customisation could look like this:.. # Turn the prompt system off: prompt off # Customise the prompt yourself: PS1='%~ %# '.. GNU/SCREEN STATUS SETTING.. sets screen's hardstatus lines to the currently running command or.. 'zsh'.. if the shell is idling at its prompt.. If the current working directory is inside a repository unter version control, screen status is set to:.. 'zsh: repository name '.. via zsh's vcs_info.. PERSISTENT HISTORY.. If you got commands you consider important enough to be included in every shell's history, you can put them into ~/.. important_commands and they will be available via the usual history lookup widgets.. REFERENCE.. ENVIRONMENT VARIABLES.. sets some environment variables, which influence the behaviour of applications.. COLORTERM.. Set to "yes".. Some applications read this to learn about properties of the terminal they are running in.. EDITOR.. If not already set, sets the default editor.. Falls back to vi(1), if vim(1) is not available.. LESS_TERMCAP_*.. Some environment variables that add colour support to less(1) for viewing man pages.. See termcap(5) for details.. MAIL.. The mailbox file for the current user is set to /var/mail/$USER, if not already set otherwise.. PAGER.. Set less(1) as default pager, if not already set to something different.. SHELL.. Set explicitly to /bin/zsh, to prevent certain terminal emulators to default to /bin/sh or /bin/bash.. OPTIONS.. Apart from zsh's default options,.. sets  ...   apt-cache policy.. With no arguments prints out the priorities of each source.. If a package name is given, it displays detailed information about the priority selection of the package.. acs.. apt-cache search.. Searches debian package lists for the regular expression provided as argument.. The search includes package names and descriptions.. Prints out name and short description of matching packages.. acsh.. apt-cache show.. Shows the package records for the packages provided as arguments.. adg.. apt-get dist-upgrade.. Performs an upgrade of all installed packages.. Also tries to automatically handle changing dependencies with new versions of packages.. As this may change the install status of (or even remove) installed packages, it is potentially dangerous to use dist-upgrade; invoked by sudo, if necessary.. ag.. apt-get upgrade.. Downloads and installs the newest versions of all packages currently installed on the system.. Under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed.. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version.. An update must be performed first (see au below); run by sudo, if necessary.. agi.. apt-get install.. Downloads and installs or upgrades the packages given on the command line.. If a hyphen is appended to the package name, the identified package will be removed if it is installed.. Similarly a plus sign can be used to designate a package to install.. This may be useful to override decisions made by apt-get's conflict resolution system.. A specific version of a package can be selected for installation by following the package name with an equals and the version of the package to select.. This will cause that version to be located and selected for install.. Alternatively a specific distribution can be selected by following the package name with a slash and the version of the distribution or the Archive name (stable, testing, unstable).. Gets invoked by sudo, if user id is not 0.. ati.. aptitude install.. Aptitude is a terminal-based package manager with a command line mode similar to apt-get (see agi above); invoked by sudo, if necessary.. au.. apt-get update.. Resynchronizes the package index files from their sources.. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.. list.. An update should always be performed before an upgrade or dist-upgrade; run by sudo, if necessary.. da.. du -sch.. Prints the summarized disk usage of the arguments as well as a grand total in human readable format.. dbp.. dpkg-buildpackage.. Builds binary or source packages from sources (See: dpkg-buildpackage(1)).. debs-by-size.. grep-status -FStatus -sInstalled-Size,Package -n "install ok installed" | paste -sd " \n" | sort -rn.. Prints installed Packages sorted by size (descending).. dir.. ls -lSrah.. Lists files (including dot files) sorted by size (biggest last) in long and human readable output format.. ge.. grep-excuses.. Searches the testing excuses files for a specific maintainer (See: grep-excuses(1)).. grep --color=auto.. Shows grep output in nice colors, if available.. grml-version.. cat /etc/grml_version.. Prints version of running grml.. hbp.. hg-buildpackage.. Helper program to maintain Debian packages with mercurial.. http.. python -m SimpleHTTPServer.. Basic HTTP server implemented in python.. Listens on port 8000/tcp and serves current directory.. Implements GET and HEAD methods.. insecscp.. scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null".. scp with possible man-in-the-middle attack enabled.. This is convenient, if the targets host key changes frequently, for example on virtualized test- or development-systems.. To be used only inside trusted networks, of course.. insecssh.. ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null".. ssh with possible man-in-the-middle attack enabled (for an explanation see insecscp above).. help-zshglob.. H-Glob().. Runs the function H-Glob() to expand or explain wildcards.. j.. jobs -l.. Prints status of jobs in the current shell session in long format.. l.. ls -lF --color=auto.. Lists files in long output format with indicator for filetype appended to filename.. If the terminal supports it, with colored output.. la.. ls -la --color=auto.. Lists files in long colored output format.. Including file names starting with ".. lad.. ls -d.. *(/).. Lists the dot directories (not their contents) in current directory.. lh.. ls -hAl --color=auto.. Lists files in long and human readable output format in nice colors, if available.. Includes file names starting with ".. " except ".. " and ".. ll.. ls -l --color=auto.. llog.. $PAGER /var/log/syslog.. Opens syslog in pager.. ls -b -CF --color=auto.. Lists directory printing octal escapes for nongraphic characters.. Entries are listed by columns and an indicator for file type is appended to each file name.. Additionally the output is colored, if the terminal supports it.. lsa.. ls -a.. *(.. Lists dot files in current working directory.. lsbig.. ls -flh *(.. OL[1,10]).. Displays the ten biggest files (long and human readable output format).. lsd.. ls -d *(/).. Shows directories.. lse.. ls -d *(/^F).. Shows empty directories.. lsl.. ls -l *(@).. Lists symbolic links in current directory.. lsnew.. ls -rl *(D.. om[1,10]).. Displays the ten newest files (long output format).. lsnewdir.. ls -rthdl *(/om[1,10]).. *(D/om[1,10]).. Displays the ten newest directories and ten newest.. directories.. lsold.. ls -rtlh *(D.. Displays the ten oldest files (long output format).. lsolddir.. ls -rthdl *(/Om[1,10]).. *(D/Om[1,10]).. Displays the ten oldest directories and ten oldest.. lss.. ls -l *(s,S,t).. Lists files in current directory that have the setuid, setgid or sticky bit set.. lssmall.. ls -Srl *(.. oL[1,10]).. Displays the ten smallest files (long output format).. lsw.. ls -ld *(R,W,X.. ^ND/).. Displays all files which are world readable and/or world writable and/or world executable (long output format).. lsx.. ls -l *(*).. Lists only executable files.. mdstat.. cat /proc/mdstat.. Lists all active md (i.. e.. linux software raid) devices with some information about them.. mq.. hg -R $(readlink -f $(hg root)/.. hg/patches).. Executes the commands on the versioned patch queue from current repository.. rmcdir.. 'cd.. ; rmdir $OLDPWD || cd $OLDPWD.. rmdir current working directory.. screen.. /usr/bin/screen -c ${HOME}/.. screenrc.. If invoking user is root, starts screen session with /etc/grml/screenrc as config file.. If invoked by a regular user, start a screen session with users.. screenrc config if it exists, else use /etc/grml/screenrc_grml as configuration.. su.. sudo su.. If user is running a grml live-CD, dont ask for any password, if she wants a root shell.. term2iso.. echo 'Setting terminal to iso mode' ; print -n '\e%@'.. Sets mode from UTF-8 to ISO 2022 (See:.. http://www.. cl.. cam.. ac.. uk/~mgk25/unicode.. html#term.. term2utf.. echo 'Setting terminal to utf-8 mode'; print -n '\e%G'.. Sets mode from ISO 2022 to UTF-8 (See:.. tlog.. tail -f /var/log/syslog.. Prints syslog continuously (See tail(1)).. up.. aptitude update ; aptitude safe-upgrade.. Performs a system update followed by a system upgrade using aptitude; run by sudo, if necessary.. See au and ag above.. url-quote.. autoload -U url-quote-magic ; zle -N self-insert url-quote-magic.. After calling, characters of URLs as typed get automatically escaped, if necessary, to protect them from the shell.. $(uname -r)-reboot.. kexec -l --initrd=/boot/initrd.. img-"$(uname -r)" --command-line=\"$(cat /proc/cmdline)\" /boot/vmlinuz-"$(uname -r)".. Reboots using kexec(8) and thus reduces boot time by skipping hardware initialization of BIOS/firmware.. cd.. /.. Changes current directory two levels higher.. AUXILIARY FILES.. This is a set of files, that - if they exist - can be used to customize the behaviour of.. Sourced at the very beginning of.. Among other things, it can be used to permantenly change.. 's STARTUP VARIABLES (see above):.. # show battery status in RPROMPT BATTERY=1 # always load the complete setup, even for root GRML_ALWAYS_LOAD_ALL=1.. Sourced right before loading.. is finished.. There is a global version of this file (/etc/zsh/zshrc.. local) which is sourced before the user-specific one.. Directory listing for persistent dirstack (see above).. important_commands.. List of commands, used by persistent history (see above).. INSTALLATION ON NON-DEBIAN SYSTEMS.. On Debian systems (.. debian.. org.. ) - and possibly Ubuntu (.. ubuntu.. com.. ) and similar systems - it is very easy to get.. via grml's.. deb repositories.. On non-debian systems, that is not an option, but all is not lost:.. % wget -O.. zshrc http://git.. grml.. org/f/grml-etc-core/etc/zsh/zshrc.. If you would also like to get seperate function files (which you can put into your.. $fpath.. ), you can browse and download them at:.. http://git.. org/?p=grml-etc-core.. git;a=tree;f=usr_share_grml/zsh;hb=HEAD.. ZSH REFCARD TAGS.. If you read.. 's code you may notice strange looking comments in it.. These are there for a purpose.. grml's zsh-refcard is automatically generated from the contents of the actual configuration file.. However, we need a little extra information on which comments and what lines of code to take into account (and for what purpose).. Here is what they mean:.. List of tags (comment types) used:.. #a#.. Next line contains an important alias, that should be included in the grml-zsh-refcard.. (placement tag: @@INSERT-aliases@@).. #f#.. Next line contains the beginning of an important function.. (placement tag: @@INSERT-functions@@).. #v#.. Next line contains an important variable.. (placement tag: @@INSERT-variables@@).. #k#.. Next line contains an important keybinding.. (placement tag: @@INSERT-keybindings@@).. #d#.. Hashed directories list generation:.. start.. : denotes the start of a list of 'hash -d' definitions.. end.. : denotes its end.. (placement tag: @@INSERT-hasheddirs@@).. #A#.. Abbreviation expansion list generation:.. : denotes the beginning of abbreviations.. : denotes their end.. Lines within this section that end in '#d.. *' provide extra documentation to be included in the refcard.. (placement tag: @@INSERT-abbrev@@).. #m#.. This tag allows you to manually generate refcard entries for code lines that are hard/impossible to parse.. Example:.. #m# k ESC-h Call the run-help function.. That would add a refcard entry in the keybindings table for 'ESC-h' with the given comment.. So the syntax is: #m# section argument comment.. #o#.. This tag lets you insert entries to the 'other' hash.. Generally, this should not be used.. It is there for things that cannot be done easily in another way.. (placement tag: @@INSERT-other-foobar@@).. All of these tags (except for m and o) take two arguments, the first within the tag, the other after the tag:.. # tag section # comment.. Where section is really just a number, which are defined by the @secmap array on top of 'genrefcard.. pl'.. The reason for numbers instead of names is, that for the reader, the tag should not differ much from a regular comment.. For zsh, it is a regular comment indeed.. The numbers have got the following meanings:.. 0.. 1.. 2.. user.. 3.. debian.. search.. 5.. shortcuts.. 6.. services.. So, the following will add an entry to the 'functions' table in the 'system' section, with a (hopefully) descriptive comment:.. #f1# Edit an alias via zle edalias() {.. It will then show up in the @@INSERT-aliases-system@@ replacement tag that can be found in 'grml-zsh-refcard.. tex.. in'.. If the section number is omitted, the 'default' section is assumed.. Furthermore, in 'grml-zsh-refcard.. in' @@INSERT-aliases@@ is exactly the same as @@INSERT-aliases-default@@.. If you want a list of.. all.. aliases, for example, use @@INSERT-aliases-all@@.. CONTRIBUTING.. If you want to help to improve grml's zsh setup, clone the grml-etc-core repository from git.. org:.. % git clone git://git.. org/grml-etc-core.. git.. Make your changes, commit them; use '.. git format-patch.. ' to create a series of patches and send those to the following address via '.. git send-email.. ':.. grml-etc-core@grml.. org.. Doing so makes sure the right people get your patches for review and possibly inclusion.. STATUS.. This manual page is the.. reference.. manual for.. That means that in contrast to the existing refcard it should document.. aspect of the setup.. This manual is currently not complete.. If you want to help improving it, visit the following pages:.. http://wiki.. org/doku.. php?id=zshrcmanual.. http://lists.. mur.. at/pipermail/grml/2009-August/004609.. html.. Contributions are highly welcome.. AUTHORS.. This manpage was written by Frank Terbeck.. ft@grml.. , Joerg Woelke.. joewoe@fsmail.. de.. , Maurice McCarthy.. manselton@googlemail.. and Axel Beckert.. abe@deuxchevaux.. COPYRIGHT.. Copyright (c) 2009-2013 Grml project.. http://grml.. This manpage is distributed under the terms of the GPL version 2.. Most parts of grml's zshrc are distributed under the terms of GPL v2, too, except for.. accept-line().. which are distributed under the same conditions as zsh itself (which is BSD-like)..

    Original link path: /zsh/grmlzshrc.html
    Open archive

  • Title: ZSH-LOVERS(1)
    Descriptive info: ZSH-LOVERS(1).. zsh-lovers - tips, tricks and examples for the Z shell.. Just read it.. ;-).. OVERVIEW.. Whenever we look at the zsh manual we wonder why there are no examples or those simply things in (shell) life.. The zsh contains many features, but there was no manpage with some examples (like procmailex(5)).. That s why we wrote this manpage.. Most of the tricks and oneliner come from the mailinglists zsh-users, zsh-workers, google, newsgroups and from ourself.. See section.. LINKS.. for details.. Note: This manpage (zsh-lovers(1)) is.. an offical part of the Z shell! It s just a just for fun - manpage ;).. For comments, bugreports and feedback take a quick look at the section.. BUGS.. SHELL-SCRIPTING.. This section provides some examples for often needed shellscript-stuff.. Notice that you should not use otherwise most examples won t work.. Parse options in shellscripts.. Example taken from ZWS by Adam Chodorowski (.. chodorowski.. com/projects/zws/.. ):.. parse_options() { o_port=(-p 9999) o_root=(-r WWW) o_log=(-d ZWS.. log) zparseopts -K -- p:=o_port r:=o_root l:=o_log h=o_help if [[ $? != 0 || "$o_help" != "" ]]; then echo Usage: $(basename "$0") "[-p PORT] [-r DIRECTORY]" exit 1 fi port=$o_port[2] root=$o_root[2] log=$o_log[2] if [[ $root[1] != '/' ]]; then root="$PWD/$root"; fi } # now use the function: parse_options $*.. EXAMPLES.. Available subsections are.. Aliases.. Completion.. Unsorted/Misc examples.. (Recursive) Globbing - Examples.. Modifiers usage.. Redirection-Examples.. ZMV-Examples.. Module-Examples.. Suffix aliases are supported in zsh since version 4.. 0.. Some examples:.. alias -s tex=vim alias -s html=w3m alias -s org=w3m.. Now pressing return-key after entering.. foobar.. starts vim with foobar.. Calling a html-file runs browser w3m.. www.. zsh.. and pressing enter starts w3m with argument www.. Global aliases can be used anywhere in the command line.. Example:.. $ alias -g C='| wc -l' $ grep alias ~/.. zsh/* C 443.. Some more or less useful global aliases (choose whether they are useful or not for you on your own):.. alias -g.. ='.. ' alias -g.. ' alias -g CA="2 1 | cat -A" alias -g C='| wc -l' alias -g D="DISPLAY=:0.. 0" alias -g DN=/dev/null alias -g ED="export DISPLAY=:0.. 0" alias -g EG='| egrep' alias -g EH='| head' alias -g EL='| less' alias -g ELS='| less -S' alias -g ETL='| tail -20' alias -g ET='| tail' alias -g F=' | fmt -' alias -g G='| egrep' alias -g H='| head' alias -g HL='| head -20' alias -g Sk="*~(*.. bz2|*.. gz|*.. tgz|*.. zip|*.. z)" alias -g LL="2 1 | less" alias -g L="| less" alias -g LS='| less -S' alias -g MM='| most' alias -g M='| more' alias -g NE="2 /dev/null" alias -g NS='| sort -n' alias -g NUL=" /dev/null 2 1" alias -g PIPE='|' alias -g R=' /c/aaa/tee.. txt ' alias -g RNS='| sort -nr' alias -g S='| sort' alias -g TL='| tail -20' alias -g T='| tail' alias -g US='| sort -u' alias -g VM=/var/log/messages alias -g X0G='| xargs -0 egrep' alias -g X0='| xargs -0' alias -g XG='| xargs egrep' alias -g X='| xargs'.. COMPLETION.. See also man 1 zshcompctl zshcompsys zshcompwid.. zshcompctl is the old style of zsh programmable completion, zshcompsys is the new completion system, zshcompwid are the zsh completion widgets.. Some functions, like _apt and _dpkg, are very slow.. You can use a cache in order to proxy the list of results (like the list of available debian packages) Use a cache:.. zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.. zsh/cache.. Prevent CVS files/directories from being completed:.. zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS' zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'.. Fuzzy matching of completions for when you mistype them:.. zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' original only zstyle ':completion:*:approximate:*' max-errors 1 numeric.. And if you want the number of errors allowed by _approximate to increase with the length of what you have typed so far:.. zstyle -e ':completion:*:approximate:*' \ max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'.. Ignore completion functions for commands you don t have:.. zstyle ':completion:*:functions' ignored-patterns '_*'.. With helper functions like:.. xdvi() { command xdvi ${*:-*.. dvi(om[1])} }.. you can avoid having to complete at all in many cases, but if you do, you might want to fall into menu selection immediately and to have the words sorted by time:.. zstyle ':completion:*:*:xdvi:*' menu yes select zstyle ':completion:*:*:xdvi:*' file-sort time.. Completing process IDs with menu selection:.. zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always.. If you end up using a directory as argument, this will remove the trailing slash (usefull in ln).. zstyle ':completion:*' squeeze-slashes true.. cd will never select the parent directory (e.. : cd.. / TAB ):.. zstyle ':completion:*:cd:*' ignore-parents parent pwd.. Another method for.. quick change directories.. Add this to your ~/.. zshrc, then just enter cd.. /dir.. rationalise-dot() { if [[ $LBUFFER = *.. ]]; then LBUFFER+=/.. else LBUFFER+=.. fi } zle -N rationalise-dot bindkey.. rationalise-dot.. UNSORTED/MISC examples.. Hint: A list of valid glob Qualifiers can be found in zshexpn(1).. See man 1 zshexpn | less -p Qualifiers for details.. # Get the names of all files that *don't* match a pattern *anywhere* on the # file (and without ``-L'' because its GNUish) $ print -rl -- *(.. ^e{'grep -q pattern $REPLY'}) # or $ : *(.. e{'grep -q pattern $REPLY || print -r -- $REPLY'}) # random numbers $ echo $[${RANDOM}%1000] # random between 0-999 $ echo $[${RANDOM}%11+10] # random between 10-20 $ echo ${(l:3::0:)${RANDOM}} # N digits long (3 digits) # reverse a word $ echo "${(j::)${(@Oa)${(s::):-hello}}}" # Show newest directory $ ls -ld *(/om[1]) # random array element $ FILES=(.. /files/* ) $ feh $FILES[$RANDOM%$#FILES+1] # cat first line in all files in this dir $ for file (*(ND-.. )) IFS= read -re $file # test if a parameter is numeric $ if [[ $1 == - ]] ; then echo numeric else echo non-numeric fi # Show me all the.. c files for which there doesn't exist a.. o file.. $ print *.. c(e_'[[ ! -e $REPLY:r.. o ]]'_) # All files in /var/ that are not owned by root $ ls -ld /var/*(^u:root) # All files for which the owner hat read and execute permissions $ echo *(f:u+rx:) # The same, but also others dont have execute permissions $ echo *(f:u+rx,o-x:) # brace expansion - example $ X=(A B C) $ Y=(+ -) $ print -r -- $^X.. $^Y A.. + A.. - B.. + B.. - C.. + C.. - # Fetch the newest file containing the string 'fgractg*.. log' in the # filename and contains the string 'ORA-' in it $ file=(fgractg*.. log(Nm0om[1])) $ (($#file)) grep -l ORA- $file # without Zsh $ files=$( find.. -name.. -o -prune -name 'fgractg* log' -mtime 0 -print ) if [ -n "$files" ]; then IFS=' ' set -f file=$(ls -td $files | head -1) grep -l ORA- "$file" fi # keep specified number of child processes running until entire task finished $ zsh -c 'sleep 1 sleep 3 sleep 2 print -rl -- $jobtexts' # Remove zero length and.. bak files in a directory $ rm -i *(.. L0) *.. bak(.. ) # print out files that dont have extensions $ printf '%s\n' ^?*.. * $ printf '%s\n' ^?*.. [^.. ]*(D) $ ls -d -- ^?*.. *(D) # Finding files which does not contain a specific string $ print -rl file* | comm -2 -3 - (grep -l string file*)' $ for f (file*(N)) grep -q string $f || print -r $f' # Show/Check whether a option is set or not.. It works both with $options as # with $builtins $ echo $options[correct] off $ $options[zle] on # Count the number of directories on the stack $ print $((${${(z)${(f)"$(dirs -v)"}[-1]}[1]} + 1)) # or $ dirs -v | awk '{n=$1}END{print n+1}' # Matching all files which do not have a dot in filename $ ls *~*.. ) # Show only the ip-address from ``ifconfig device'' # ifconfig from net-tools (Linux) $ print ${${$(LC_ALL=C /sbin/ifconfig eth0)[7]}:gs/addr://} # ifconfig from 4.. 2BSD {Free,Net,Open}BSD $ print ${$(/sbin/ifconfig tun0)[6]} # Ping all the IP addresses in a couple of class C's or all hosts # into /etc/hosts $ for i in {1.. 254}; do ping -c 1 192.. 168.. 13.. $i; done or $ I=1 $ while ( [[ $I -le 255 ]] ) ; do ping -1 2 150.. 150.. $I; let I++; done or $ for i in $(sed 's/#.. *//' /etc/hosts | awk '{print $2}') : do : echo "Trying $i.. " : ping -c 1 $i ; : echo '=============================' : done # load all available modules at startup $ typeset -U m $ m=() $ for md ($module_path) m=($m $md/**/*(*e:'REPLY=${REPLY#$md/}'::r)) $ zmodload -i $m # Rename all files within a directory such that their names get a numeral # prefix in the default sort order.. $ i=1; for j in *; do mv $j $i.. $j; ((i++)); done $ i=1; for f in *; do mv $f $(echo $i | \ awk '{ printf("%03d", $0)}').. $f; ((i++)); done $ integer i=0; for f in *; do mv $f $[i+=1].. $f; done # Find (and print) all symbolic links without a target within the current # dirtree.. $ $ file **/*(D@) | fgrep broken $ for i in **/*(D@); [[ -f $i || -d $i ]] || echo $i $ echo **/*(@-^.. /=%p) $ print -l **/*(-@) # List all plain files that do not have extensions listed in `fignore' $ ls **/*~*(${~${(j/|/)fignore}})(.. ) # see above, but now omit executables $ ls **/*~*(${~${(j/|/)fignore}})(.. ^*) # Print out files that dont have extensions (require *setopt extendedglob* # and *setopt dotglob*) $ printf '%s\n' ^?*.. * # List files in reverse order sorted by name $ print -rl -- *(On) or $ print -rl -- *(^on) # Synonymic to ``ps ax | awk '{print $1}''' $ print -l /proc/*/cwd(:h:t:s/self//) # Get the PID of a process (without ``ps'', ``sed'', ``pgrep'',.. # (under Linux) $ pid2 () { local i for i in /proc/ - /stat do [[ "$( $i)" = *\((${(j:|:)~@})\)* ]] echo $i:h:t done } # for X in 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y'; do.. $ for (( i = 36#n; i = 36#y; i++ )); do print ${$(([##36]i)):l} done # or in combination with ``dc'' $ print {$((##n)).. $((##y))}P\ 10P | dc # or with ``eval'' $ eval print '${$(([##36]'{$((36#n)).. $((36#y))}')):l}' # foreach in one line of shell $ for f (*) print -r -- $f # copy a directory recursively without data/files $ dirs=(**/*(/)) $ cd -- $dest_root $ mkdir -p -- $dirs # or without zsh $ find.. -type d -exec env d="$dest_root" \ sh -c ' exec mkdir -p -- "$d/$1"' '{}' '{}' \; # If `foo=23'', then print with 10 digit with leading '0'.. $ foo=23 $ print ${(r:10::0:)foo} # find the name of all the files in their home directory that have # more than 20 characters in their file names print -rl $HOME/${(l:20::?:)~:-}* # Save arrays $ print -r -- ${(qq)m} $nameoffile # save it $ eval "m=($(cat -- $nameoffile)" # or use $ m=("${(@Q)${(z)"$(cat -- $nameoffile)"}}") # to restore it # get a "ls -l" on all the files in the tree that are younger than a # specified age (e.. g "ls -l" all the files in the tree that where # modified in the last 2 days) $ ls -tld **/*(m-2) # This will give you a listing 1 file perl line (not à la ls -R).. # Think of an easy way to have a "ls -R" style output with # only files newer than 2 day old.. $ for d (.. /**/*(/)) { print -r -- $'\n'${d}: cd $d { l=(*(Nm-2)) (($#l)) ls -ltd -- $l cd ~- } } # If you also want directories to be included even if their mtime # is more than 2 days old: $ for d (.. /**/*(/)) { print -r -- $'\n'${d}: cd $d { l=(*(N/,m-2)) (($#l)) ls -ltd -- $l cd ~- } } # And if you want only the directories with mtime 2 days to be listed: $ for d (.. /**/*(N/m-2)) { print -r -- $'\n'${d}: cd $d { l=(*(Nm-2)) (($#l)) ls -ltd -- $l cd ~- } } # print 42 ``-'' $ echo ${(l:42::-:)} # or use ``$COLUMS'' $ echo ${(l:$COLUMNS::-:)} # and now with colors (require autoload colors ;colors) $ echo "$bg[red]$fg[black]${(l:42::-:)}" # Redirect STDERR to a command like xless without redirecting STDOUT as well.. $ foo 2 (xless) # but this executes the command asynchronously.. To do it synchronously: $ { { foo 1 3 } 2 1 | xless } 3 1 # Rename all MP3-Files from name with spaces.. mp3 to Name With Spaces.. mp3 $ for i in *.. mp3; do mv $i ${${(C)i}:s/Mp3/mp3/} done # Match file names containing only digits and ending with.. xml (require # *setopt kshglob*) $ ls -l [0-9]##.. xml $ ls -l 0-.. xml # Remove all "non txt" files $ rm.. /^*.. txt # Move 200 files from a directory into another $ mv -- *([1,200]) /another/Dir # Convert images (foo.. gif = foo.. png): $ for i in **/*.. gif; convert $i $i:r.. png # convert a collection of mp3 files to wave or cdr, # e.. file.. wav - file.. mp3) $ for i (.. /*.. mp3){mpg321 --w - $i ${i:r}.. wav} # Download with LaTeX2HTML created Files (for example the ZSH-Guide): $ for f in http://zsh.. sunsite.. dk/Guide/zshguide{,{01.. 08}}.. html; do lynx -source $f ${f:t} done # Move all files in dir1 and dir2 that have line counts greater than 10 to # another directory say "/more10" $ mv dir[12]/**/*.. cr(-.. e{'((`wc -l $REPLY` 10))'}) /more10 # Make with dpkg a master-list of everyfile that it has installed $ diff (find / | sort) (cat /var/lib/dpkg/info/*.. list | sort) # Replace this fucking Escape-Sequences: $ autoload colors ; colors $ print "$bg[cyan]$fg[blue]You are a idiot" /dev/pts/3 # Get ASCII value of a character $ char=N ; print $((#char)) # Filename "Erweiterung" # Note: The (N) says to use the nullglob option for this particular # glob pattern.. $ for i in *.. o(N); do rm $i done # Rename files; i.. e.. FOO to foo and bar to BAR $ for i in *(.. ); mv $i ${i:l} # `FOO' to `foo' $ for i in *(.. ); mv $i ${i:u} # `bar to `BAR' # Show all suid-files in $PATH $ ls -latg ${(s.. :.. )PATH} | grep '^.. s' # or more complex ;) $ print -l ${^path}/*(Ns,S) # or show only executables with a user given pattern $ print -l ${^path}/*vim*(*N) # gzip files when containing a certain string $ gzip ${(ps:\0:)"$(grep -lZ foobar.. txt(.. ))"} # A small one-liner, that reads from stdin and prints to stdout the first # unique line i.. does not print lines that have been printed before # (this is similar to the unique command, but unique can only handle # adjacent lines).. $ IFS=$'\n\n'; print -rl -- ${(Oau)${(Oa)$(cat file;echo.. )[1,-2]}} # Lists every executable in PATH $ print -l ${^path}/*(-*N) # Match all.. c files in all subdirectories, _except_ any SCCS subdirectories? $ ls **/*.. c~(*/)#SCCS/* # List all `README' - files case-insensitive with max.. one typo $ ls **/*(#ia2)readme # case insensitive checking for variables $ if [[ $OSTYPE == (#i)LINUX*(#I) ]]; then echo "Penguin on board.. " else echo "Not a Linux.. " fi.. A list of valid glob Qualifiers  ...   # ``D'' is to also rename hidden files (dotfiles)) $ autoload zmv $ zmv -Q '/home/**/*(D-.. )' '$f.. txt' # Or to only rename files that don't have an extension: $ zmv -Q '/home/**/^?*.. *(D-.. txt' # Recursively change filenames with characters ? [ ] / = + ; : " , - * $ autoload zmv $ chars='[][?=+ ;",*-]' $ zmv '(**/)(*)' '$1${2//$~chars/%}' # Removing single quote from filenames (recursively) $ autoload zmv $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}" # When a new file arrives (named file.. txt) rename all files in order to # get (e.. g.. file119.. txt becomes file120.. txt, file118.. txt becomes # file119.. txt and so on ending with file.. txt becoming file1.. txt $ autoload zmv $ zmv -fQ 'file([0-9]##).. txt(On)' 'file$(($1 + 1)).. txt' # lowercase/uppercase all files/directories $ autoload zmv $ zmv '(*)' '${(L)1}' # lowercase $ zmv '(*)' '${(U)1}' # uppercase # Remove the suffix *.. c from all C-Files $ autoload zmv $ zmv '(*).. c' '$1' # Uppercase only the first letter of all *.. mp3 - files $ autoload zmv $ zmv '([a-z])(*).. mp3' '${(C)1}$2.. mp3' # Copy the target `README' in same directory as each `Makefile' $ autoload zmv $ zmv -C '(**/)Makefile' '${1}README' # Removing single quote from filenames (recursively) $ autoload zmv $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}" # Rename pic1.. jpg, pic2.. to pic0001.. jpg, pic0002.. $ autoload zmv $ zmv 'pic(*).. jpg' 'pic${(l:4::0:)1}.. jpg' $ zmv '(**/)pic(*).. jpg' '$1/pic${(l:4::0:)2}.. jpg' # recursively.. Please read zshmodules(1) first!.. zsh/pcre (require zmodload zsh/pcre).. # Copy files of a certain period (date indicated in the filenames) $ zmodload zsh/pcre $ ls -d -- *(e:'[[ $REPLY -pcre-match pcre-regexp ]]':) # or $ m() { [[ $1 -pcre-match pcre-regexp ]] } $ ls -d -- *(+m).. zsh/clone (require zmodload zsh/clone).. # Creates a forked instance of the current shell ($! is set to zero) and # execute ``command'' on /dev/tty8 (for this example).. $ zmodload zsh/clone $ clone /dev/tty8 (($! == 0)) exec command.. zsh/datetime (require zmodload zsh/datetime).. $ zmodload zsh/datetime $ alias datereplacement='strftime "%Y-%m-%d" $EPOCHSECONDS' $ export DATE=`datereplacement` $ echo $DATE # strip date from filename $ $ zmodload zsh/datetime $ setopt extendedglob $ touch aaa_bbb_20041212_c.. dat eee_fff_20051019_g.. dat $ strftime -s pattern \ '???_???_ 0-%Y%m%d _?.. dat' $((EPOCHSECONDS - 365 * 24 * 60 * 60 / 2)) $ print -rl -- $~pattern aaa_bbb_20041212_c.. dat $ print -rl -- $pattern ???_???_ 0-20050815 _?.. dat # Search files size == 0, to be based on the file name containing a date # rather than the "last modified" date of the file $ zmodload -i zsh/datetime $ strftime -s file "abc_de_%m%d%Y.. dat" $((EPOCHSECONDS - 24 * 60 * 60 )) $ files=(**/$file(N.. L0)) $ (( $#files 0 )) print -rl -- $files | \ mailx -s "empty files" foo@bar.. tdl.. zsh/stat (require zmodload zsh/stat).. # test if a symbolic link links to a certain file $ zmodload -i zsh/stat $ ! stat -LH s foo.. ln || [[ $s[link] != "foo.. exe" ]] || ln -sf foo.. exe foo.. ln # comparing file dates $ zmodload zsh/stat $ file1=foo $ file2=bar $ touch bar sleep 5 touch foo $ echo $file1 is $(($(stat +mtime $file2) - \ $(stat +mtime $file1))) seconds older than $file2.. bar is 5 seconds older than foo # list the files of a disk smaller than some other file $ zmodload zsh/stat $ stat -A max +size some-other-file $ print -rl.. /**/*(D.. L-$max) # List the top 100 biggest files in a disk $ zmodload zsh/stat $ ls -fld.. /**/*(d`stat +device.. `OL[1,100]) # Get only the user name and the file names from (like # ls -l * | awk '{print $3" " $8}') $ zmodload zsh/stat $ for file; do stat -sA user +uid -- "$file" print -r -- "$user" "$file" done # get the difference between actual bytes of file and allocated bytes of file $ zmodload zsh/stat $ print $(($(stat +block -- file) * 512 - $(stat +size -- file))) # Find largest file # ``D'' : to include dot files (d lowercase is for device) # ``O'' : reverse Ordered (o lowercase for non-reverse order) # ``L'' : by file Length (l is for number of links) # ``[1]'': return only first one $ zmodload zsh/stat $ stat +size.. /*(DOL[1]) # file size in bytes $ zmodload zsh/stat $ stat -L +size ~/.. zshrc 4707 # Delete files in a directory that hasn't been accessed in the last ten days # and send ONE mail to the owner of the files informing him/her of the files' # deletion.. $ zmodload zsh/stat zsh/files $ typeset -A f; f=() $ rm -f /path/**/*(.. a+10e{'stat -sA u +uidr $REPLY; f[$u]="$f[$u]$REPLY"'}) $ for user (${(k)f}) {print -rn $f[$user]|mailx -s ".. " $user} # Get a "ls -l" on all the files in the tree that are younger than a # specified age $ zmodload zsh/stat $ for d (.. /**/*(N/m-2)) print -r -- $'\n'$d: cd $d { for f (*(Nm-2om)) stat -F '%b %d %H:%M' -LsAs -- $f print -r -- $s[3] ${(l:4:)s[4]} ${(l:8:)s[5]} \ ${(l:8:)s[6]} ${(l:8:)s[8]} $s[10] $f ${s[14]:+- $s[14]} cd ~- } # get file creation date $ zmodload zsh/stat $ stat -F '%d %m %Y' +mtime ~/.. zshrc 30 06 2004 $ stat -F '%D' +mtime ~/.. zshrc 06/30/04.. zsh/files (require zmodload zsh/files).. # search a directory for files containing a certain string then copy those # files to another directory.. $ zmodload zsh/files $ IFS=$'\0' $ cp $(grep -lZr foobar.. ) otherdirectory.. zsh/mapfile (require zmodload zsh/mapfile).. # grepping for two patterns $ zmodload zsh/mapfile $ pattern1="foo" $ pattern2="bar foo" $ print -l.. /**/*(DN.. e{'z=$mapfile[$REPLY] [[ $z = *$pattern1* \ $z = *$pattern2* ]]'}) # or a solution in combination with zsh/pcre $ zmodload -i zsh/mapfile zsh/pcre $ pattern1="foo" $ pattern2="bar foo" $ pcre_compile "(?s)(?=.. *?$pattern1).. *?$pattern2" $ pcre_study $ print -l.. e{'pcre_match $mapfile[$REPLY]'}) # equivalent for ``less /etc/passwd | grep -v root'' $ zmodload zsh/mapfile $ IFS=$'\n\n' $ print -rl -- ${${=mapfile[/etc/passwd]}:#*root*} # or - for case insensitive $ setopt extendedglob $ print -rl -- ${${=mapfile[/etc/passwd]}:#*(#i)root*} # If a XML-file contains stuff like `` TAGA/ '' and `` TAGB/ '', number # this empty tags (ones ending in '/ ') so if encountered in the same # order, the preceeding tags would become `` TAGA/ 1 /TAGA '' and # `` TAGB/ 2 /TAGB '' $ zmodload zsh/mapfile $ cnt=0 $ apfile[data.. xml.. new]=${(S)mapfile[data.. xml]//\ (#im) TAGA * \/TAGA / TAGA $((++cnt)) \/TAGA } # removing all files in users Maildir/new that contain ``filename="gone.. src'' $ zmodload zsh/{files,mapfile} $ rm -f /u1/??/*/Maildir/new/100*(.. e{'[[ $mapfile[$REPLY] == \ *filename=\"gone.. scr\"* ]]'}) # Grep out the Title from a postscript file and append that value to the # end of the filename $ autoload -U zmv $ zmodload zsh/mapfile $ zmv '(*).. ps' '$1-${${${mapfile[$f]##*%%Title: }%% *}//[^a-zA-Z0-9_]/}.. ps'.. zsh/mathfunc (require zmodload zsh/mathfunc).. $ zmodload zsh/mathfunc $ echo $(( sin(1/4.. 0)**2 + cos(1/4.. 0)**2 - 1 )) -1.. 1102230246251565e-16 $ echo $(( pi = 4.. 0 * atan(1.. 0) )) 3.. 1415926535897931 $ echo $(( f = sin(0.. 3) )) 0.. 29552020666133955 $ print $((1e12 * rand48())) 847909677310.. 23413 $ print $(( rand48(seed) )) 0.. 01043488334700271.. zsh/termcap (require zmodload zsh/termcap).. $ zmodload -ab zsh/termcap echotc $ GREEN=`echotc AF 2` $ YELLOW=`echotc AF 3` $ RED=`echotc AF 1` $ BRIGHTRED=`echotc md ; echotc AF 1` $ print -l ${GREEN}green ${YELLOW}yellow ${RED}red ${BRIGHTRED}brightred.. zsh/zpty (require zmodload zsh/zpty).. $ zmodload zsh/zpty $ zpty PW passwd $1 $ zpty PW passwd $1 # ``-r'': read the output of the command name.. # ``z'' : Parameter $ zpty -r PW z '*password:' # send the to command name the given strings as input $ zpty -w PW $2 $ zpty -r PW z '*password:' $ zpty -w PW $2 # The second form, with the -d option, is used to delete commands # previously started, by supplying a list of their names.. If no names # are given, all commands are deleted.. Deleting a command causes the HUP # signal to be sent to the corresponding process.. $ zpty -d PW.. zsh/net/socket (require zmodload zsh/net/socket).. # ``-l'': open a socket listening on filename # ``-d'': argument will be taken as the target file descriptor for the # connection # ``3'' : file descriptor.. See ``A User's Guide to the Z-Shell'' # (3.. 2: File descriptors) $ zmodload zsh/net/socket $ zsocket -l -d 3 # ``-a'': accept an incoming connection to the socket $ zsocket -a -d 4 3 $ zsocket -a -d 5 3 # accept a connection $ echo foobar 4 $ echo barfoo 5 $ 4 - 5 - 3.. zsh/zftp (require zmodload zsh/zftp).. $ autoload -U zfinit $ zfinit $ zfparams www.. example.. invalid myuserid mypassword $ zfopen $ zfcd tips $ zfls -l zshtips.. html $ zfput zshtips.. html $ zfls -l zshtips.. html # Automatically transfer files using FTP with error checking $ autoload -U zfinit ; zfinit $ zftp open host.. name.. invalid user passwd || exit $ zftp get /remote/file /local/file; r=$? $ zftp close exit r # compress and ftp on the fly $ autoload -U zfinit ; zfinit $ zftp open host.. invalid user password $ zftp get $file | bzip2 ${file}.. bz2 $ zftp close # Recursice ``get'' $ autoload -U zfinit ; zfinit $ zfanon cr.. yp.. to $ zfcd daemontools $ for file in `zfls` ; do zfget $file $ done $ zfclose # Upload all regular files in $HOME/foobar (recursive) that are newer than # two hours to ftp.. foobar.. invalid/path/to/upload $ autoload -U zfinit ; zfinit $ zfopen ftp.. invalid/path/to/upload $ cd $HOME/foobar $ zfput -r **/*(.. mh-2) $ zfclose # long list of files on a ftp $ autoload -U zfinit ; zfinit $ zfopen some-host $ zfcd /some/remote/Dir $ cd /some/local/Dir # If the list.. txt is located on the remote host, change to # zfget ${(f)"$(zftp get /path/to/remote/list.. txt)"} $ zfget ${(f)"$(cat list.. txt)"} $ zfclose.. zsh/zselect (require zmodload zsh/zselect).. # It's similar to ,---- | $ sg=$(stty -g) | $ stty -icanon min 0 time 50 | $ read yesno | $ stty "$sg" | $ case "$yesno" in | yes) command1;; | *) command2;; | esac `---- $ zmodload zsh/zselect $ if zselect -t 500 -r 0 read yesno [ yes = "$yesno" ]; then command1 else command1 fi.. Navigation options.. (allow one to change to a directory by entering it as a command).. (automatically append dirs to the push/pop list) pushd_ignore_dups (and don t duplicate them).. Misc.. no_hup.. (don t send HUP signal to background jobs when exiting ZSH).. print_exit_value.. (show a message with the exit code when a command returns with a non-zero exit code).. History options.. hist_verify.. (let the user edit the command line after history expansion (e.. !ls) instead of immediately running it).. Use the same history file for all sessions :.. setopt SHARE_HISTORY.. Privacy / Security.. no_clobber.. (or set -C; prevent.. redirection from truncating the given file if it already exists).. Spelling correction.. correct.. (automatically correct the spelling of commands).. correct_all.. (automatically correct the spelling of each word on the command line).. dvorak.. (dvorak layout).. UNSORTED/MISC.. Mailpath: simple multiple mailpath:.. mailpath=($HOME/Mail/mbox'?new mail in mbox' $HOME/Mail/tux.. u-strasbg'?new mail in tux' $HOME/Mail/lilo'?new mail in lilo' $HOME/Mail/ldap-fr'?new mail in ldap-fr').. Mailpath: dynamic mailpath:.. typeset -a mailpath for i in ~/Mail/Lists/*(.. ); do mailpath[$#mailpath+1]="${i}?You have new mail in ${i:t}.. " done.. Avoid globbing on special commands:.. for com in alias expr find mattrib mcopy mdir mdel which; alias $com="noglob $com".. For migrating your bashprompt to zsh use the script bash2zshprompt located in the zsh source distribution under.. For migration from (t)csh to zsh use the c2z tool that converts csh aliases and environment and shell variables to zsh.. It does this by running csh, and having csh report on aliases and variables.. The script then converts these to zsh startup files.. It has some issues and usage information that are documented at the top of this script.. Here are functions to set the title and hardstatus of an.. XTerm.. or of.. GNU Screen.. to.. and the current directory, respectively, when the prompt is displayed, and to the command name and rest of the command line, respectively, when a command is executed:.. function title { if [[ $TERM == "screen" ]]; then # Use these two for GNU Screen: print -nR $' 33k'$1$' 33'\ print -nR $' 33]0;'$2$'' elif [[ $TERM == "xterm" || $TERM == "rxvt" ]]; then # Use this one instead for XTerms: print -nR $' 33]0;'$*$'' fi } function precmd { title zsh "$PWD" } function preexec { emulate -L zsh local -a cmd; cmd=(${(z)1}) title $cmd[1]:t "$cmd[2,-1]" }.. Put the following line into your ~/.. screenrc to see this fancy hardstatus:.. caption always "%3n %t%? (%u)%?%?: %h%?".. Special variables which are assigned:.. $LINENO $RANDOM $SECONDS $COLUMNS $HISTCHARS $UID $EUID $GID $EGID $USERNAME $fignore $mailpath $cdpath.. Primary site.. org/.. Project-page.. http://sourceforge.. net/projects/zsh/.. Z shell page at sunsite.. dk.. dk/.. From Bash to Z Shell: Conquering the Command Line - the book.. bash2zsh.. com/.. "Zsh - die magische Shell" (german book about Zsh) by Sven Guckes and Julius Plenz.. http://zshbuch.. Mailinglistarchive.. org/mla/.. ZSH-FAQ.. dotsrc.. org/FAQ/.. Userguide.. dk/Guide/.. ZSH-Wiki.. http://zshwiki.. org/home/.. A short introduction from BYU.. http://docs.. cs.. byu.. edu/linux/advanced/zsh.. Mouse-Support ;).. http://stchaz.. free.. fr/mouse.. Curtains up: introducing the Z shell.. http://www-128.. ibm.. com/developerworks/linux/library/l-z.. html?dwzone=linux.. ZSH-Liebhaberseite (german).. http://michael-prokop.. at/computer/tools_zsh_liebhaber.. ZSH-Seite von Michael Prokop (german).. at/computer/tools_zsh.. ZSH Prompt introduction.. http://aperiodic.. net/phil/prompt/.. ft s zsh configuration.. http://ft.. bewatermyfriend.. org/comp/zsh.. Adam s ZSH page.. adamspiers.. org/computing/zsh/.. Zzappers Best of ZSH Tips.. rayninfo.. co.. uk/tips/zshtips.. Zsh Webpage by Christian Schneider.. strcat.. de/zsh/.. The zsh-lovers webpage.. org/zsh/.. IRC channel.. #zsh at irc.. freenode.. The Z shell reference-card (included in the zsh-lovers debian-package).. com/zsh_refcard/refcard.. pdf.. This manpage was written by Michael Prokop, Christian.. strcat.. Schneider and Matthias Kopfermann.. But many ideas have been taken from zsh-geeks e.. from the zsh-mailinglists (zsh-users and zsh-workers), google, newsgroups and the zsh-Wiki.. Thanks for your cool and incredible tips.. We learned much from you!.. In alphabetic order:.. Andrew 'zefram' Main - http://www.. fysh.. org/~zefram/ Barton E.. Schaefer - http://www.. well.. com/user/barts/ Matthias Kopfermann - http://www.. infodrom.. north.. de/~matthi/ Oliver Kiddle - http://people.. freenet.. de/opk/ Paul Falstad - http://www.. falstad.. com/ Peter Stephenson - http://homepage.. ntlworld.. com/p.. w.. stephenson/ Richard Coleman Stephane Chazelas - http://stephane.. chazelas.. fr/ Sven Guckes - http://www.. guckes.. net/ Sven Wischnowsky - http://w9y.. de/zsh/zshrc.. SEE ALSO.. Manpages of zsh:.. zsh Zsh overview zshall Tthe Z shell meta-man page zshbuiltins Zsh built-in commands zshcalsys zsh calendar system zshcompctl zsh programmable completion zshcompsys Zsh completion system zshcompwid Zsh completion widgets zshcontrib User contributions to zsh zshexpn Zsh expansion and substitution zshmisc Anything not fitting into the other sections zshmodules Zsh loadable modules zshoptions Zsh options zshparam Zsh parameters zshroadmap Informal introduction to the zsh manual zshtcpsys Zsh tcp system zshzle Zsh command line editing zshzftpsys Zsh built-in FTP client zshall Meta-man page containing all of the above.. Note: especially.. man zshcontrib.. covers very useful topics!.. Book:.. From Bash to Z Shell.. by Oliver Kiddle, Jerry Peck and Peter Stephenson.. ISBN: 1590593766.. -.. bash2zsh.. Also take a look at the section.. in this manpage.. Probably.. This manpage might be never complete.. So please report bugs, feedback and suggestions to.. zsh-lovers@michael-prokop.. at.. Thank you!.. Copyright (C) Michael Prokop, Christian Schneider and Matthias Kopfermann.. Last updated 2010-07-28 17:55:37 EDT..

    Original link path: /zsh/zsh-lovers.html
    Open archive

  • Title: grml.org - Download
    Descriptive info: NOTE: This is a PRE-RELEASE, not a stable release yet.. You have been warned.. Looking for the stable release version instead?.. Download the Grml flavour you need, then write it to a CD-R or an empty USB stick.. Download from a specific mirror.. Direct download links:.. Grml96 full ISO.. Signature.. Grml64 full ISO.. Grml32 full ISO.. Grml96 small  ...   64-bit PC (amd64).. 32-bit PC (i586+).. One for both (~700MB).. Download Now.. Get Checksum/Signature.. Download Now.. Alternate downloads.. Daily images.. Older releases.. Source code.. (one tgz for both architectures).. Signing Key.. Please verify all downloads using GnuPG!.. Boot from USB stick.. Just.. dd(1).. the downloaded ISO to an.. USB stick!.. dd if=grml_2013.. iso of=/dev/USB_STICK.. Troubleshooting.. Boot option guide..

    Original link path: /download/prerelease/
    Open archive

  • Title: grml.org: daily grml snapshots / builds
    Descriptive info: Daily Grml snapshots.. This page provides.. automatically generated snapshots.. of the.. Grml Linux Live system.. which were built using.. grml-live.. If you don't know what Grml is, please see.. the Grml FAQ.. WARNING: Feel free to use the ISOs but please note that they are not official.. stable releases.. They contain the latest code, but bugs are also likely.. In fact, these snapshots may not work at all.. So:.. PLEASE USE THEM WITH CAUTION!.. Please.. report any bugs you notice.. Note: the first link on each line points to the most recent available snapshot of the  ...   points to a directory that contains older available snapshots of the respective Grml flavour (as well as the latest snapshot).. Debian testing based Grml images.. grml-full.. grml64-full_testing (64bit):.. latest ISO.. sha1.. --.. Older Versions.. grml32-full_testing (32bit):.. grml-small.. grml64-small_testing (64bit):.. grml32-small_testing (32bit):.. Debian unstable based Grml images.. grml64-full_sid (64bit):.. grml32-full_sid (32bit):.. grml64-small_sid (64bit):.. grml32-small_sid (32bit):.. base files.. can be used for the base chroot/debootstrap system within.. Place these into /etc/grml/fai/config/basefiles/.. AMD64.. gz.. I386.. Problems? Questions?.. Contact us.. But please do not forget to provide all the relevant information (especially which Grml flavour and version you are referring to)..

    Original link path: /daily/
    Open archive

  • Title: grml.org - Survey 2011
    Descriptive info: Grml User Survey 2011.. Preface.. In the beginning of 2011 we started a Grml user survey.. From our point of view it was an overwhelming success.. As promised we will share the results and discuss the feedback we got in detail.. tl;dr.. ? Skip to the.. conclusion.. Interested in.. all the answers.. ?.. The Good.. First of all some numbers regarding our user survey.. 28 questions, answered by more than 300 users in a timeframe of less than one month.. This means more than 8000 entries.. On the day of the announcement more than 70 people answered our survey.. For our last.. user survey back in 2007.. 103 people answered in one month.. Long story short: it was an overwhelming success.. Due to the many open questions we got some interesting, fun and exciting answers.. We also got some nice use cases for Grml.. The overall quality of the provided answers, especially in the custom texts were astonishing and we all enjoyed them.. The Bad.. Obviously some questions could have been asked in a better way, for example the DVD question.. Instead of asking should we produce DVD Images we could have asked if its worthwhile to keep the 700MB limit for the CDs.. Nevertheless we now know that a DVD-image is not really important and worthwhile as most of you want to get CD-sized images these days.. As we used Google Forms we did not get the IP address of the participant.. So we weren't able to gather geographic information about the participants.. We fixed this after we noticed the problem by adding another question asking participants about their location.. We did not ask about contact information but it would have been worthwhile in some cases to get back to our users and provide answers or hints.. We did not change the survey as we were unsure if its appropriate to ask for contact information in a survey.. Most answers did not result in immediate actions but we already discussed the inclusion of provided packages and had a look at provided URLs.. The Ugly.. We used Google Forms and had many Other options available.. Unfortunately Google automatically translates predefined labels.. This means for e.. persons from german speaking countries the Other label was called Andere or the submit button Absenden.. It would be great to disable that feature or provide proper multi language form support in Google Docs.. Also the evaluation of custom answers turned out to be a lot of work.. Conclusion.. Our strong focus on system administration tasks has been affirmed by our users in 2007 and today.. We will continue to aim to be the best speciality Debian-based distribution for these use cases.. Desktop users will continue to be supported on the same level as always.. While our user base is strong in Europe, we must expand further into US and Asia.. A first step, namely new mirrors closer to these regions, has already been made.. A lot of awesome software has been suggested and some of it already made it to the daily Grml builds.. We will continue to work on adding new software, but the important One CD (700MB) limit is obviously a hard barrier.. We still want your feedback on all topics, but especially from users of non-Debian-based distros.. What do you like, what's missing, what's bad for you?.. Send and share your feedback.. drop us a message.. !.. Thanks to everyone taking part in our survey!.. Table of Content - the Answers.. About you.. Since when have you been using Grml?.. How did you stumble upon Grml?.. Where are you located?.. Level of Linux knowledge.. Which operating systems do you use?.. If you are using Linux, which distributions do you use?.. Did you start your own Open Source project?.. Are you involved in any FLOSS projects? If so in which areas?.. Company Use case.. In which environments do you use Grml?.. If you are using Grml in a company, what is the name of the company?.. Size of the company.. Industry of the company.. Is there anything you and/or your company would like to say about Grml?.. Questions about Grml.. Which boot media are you using for Grml?.. Ever used Grml for.. What's your most creative solution with Grml?.. Why are you using Grml?.. Tools Programs.. Which programs did you use at least once?.. Which bootoptions do you use?.. Which windowmanagers do you use on Grml?.. Which tools would you like to see on Grml?.. Future of Grml.. Which Grml-flavors make sense?.. Should we produce a DVD image instead of a CD image?.. Should we ship multiple window managers?.. Do you use Grml packages on Debian-Stable?.. What else should be changed in Grml?.. Anything else?.. Wishlist for improvements on Grml.. Did we forget anything? Any famous last words?.. About you.. We seem to have a healthy mixture out of longstanding as well as newer users which we consider a good sign to provide high quality together with enough innovation.. Most users come from suggestions by friends or on IRC as well as independent websites.. Just about a quarter stumbled upon Grml through official media press.. We consider this result as a healthy combination and a proof of the rule how important word-of-mouth recommendations are.. Our favourite custom answer: The internet.. The first 65 survey results lacked this question and 5% didn't answer this question.. As the chart shows we cover all continents but Europe is the place with the largest user base.. At the last Grml developer meeting we decided to put effort into providing mirrors outside Europe.. Thanks to people providing mirrors rit.. edu (New York/US) and ftp.. tw.. org (Taiwan) our mirror coverage improved a bit already, but our efforts toward improving Grml's coverage outside Europe won't stop.. Most people classify themselves as experts or intermediate.. This fits well in our focus.. We think we are on track with our user base.. 99% of Grml's users use Linux and interestingly BSD got a better result than Mac OS.. Amongst the answers in others have been Solaris, Haiku, Netware, HPUX, AIX, MS-DOS/FreeDOS, irix, Palm OS5 and Symbian S40, whereas Solaris was the leading answer in others with an overall count of 23.. With a leading 86% our users are Debian users.. Nearly half of them also use Ubuntu (or any Ubuntu based derivative) whereas other Linux distributions have a coverage of less than 20% each.. The answers others included 21x Arch Linux, 10x Grml (hehe! :)), 5x (Free/Open/.. )WRT, 3x LFS, 3x Knoppix, 3x Maemo, 2x puppy, 2x MEPIS, 2x Mint, 1x DSL, 1x Slacks, 1x Aptosid, 1x Archbang, 1x Quirky, 1x Mandriva, 1x Scientific Linux, 1x Sabayon, 1x OpenBSD (huh? :)), 1x SLiTaz, 1x CrunchBang, 1x AntiX.. As a result we can say that most of our users seem to be used to Debian(-based) distributions.. We got 32 answers, which namely included the following Open source projects: bley, wApua, unburden_home_dir, xpt, Hag (hag-linux.. eu.. org, Grml derivative or rather a remix BTW, now kinda dead, but I still have some plans), baculafs, undbx, HOG-Man (scientific software), more than 15 ones (the currently most popular being jpdftweak), variety of very small projects, IdyllaOS, timecalc, rffc, bwm-ng, immv, FAI, i3, goldbach, FVWM-Crystal, FDTD, Nagiosms, MirBSD, My personal gooogle, SNPpy, bixfile, ngircd, MikeBrother, HME,  ...   it early had amd64 support, zsh rocks, in rescue mission its important to have a distri, which supports LVM2 and raid systems oftb, the team reacts very quick on suggestions and answers.. moved from Knoppix to grml (less X and Office - more SHELL and Tools) - love debian - love the many, many grml-.. scripts that make it so handy to use - love the names (Funkenzutzler 4 the win !!!elf).. It's debian-like; I couldn't get debian-live to work for me; It's easy to customize; It contains *all* the packages I needed.. Meets my basic requirements for a rescue distribution: Debian based, bootable from USB with data persistence, customizable.. and it has Emacs!.. I love GRML.. I love what you guys do.. I really, really love GRML.. This distro has deeply affected my interest in Linux by providing me with out-of-the-box customized professional linux awsomeness.. I will never be as good as you guys at anything that you do, I will never be as smart as you guys and I have a fraction of the talent.. I could never write a single one of these scripts or customizations.. I will never be a professional programmer and I will never be as good at anything as you are at this.. But you have allowed me to see what you do and get right in there and do it to, you have allowed me to this extremely advanced stuff that I would never have the chance to access otherwise, let alone even be aware of.. 1) It boots without X11.. 2) Every tool I ever expected to be there, was there.. release names :).. GRML converted me to zsh.. Now I use GRML because of zsh.. We tried other live system, of course Knoppix and Kanotix, but Grml just rocks the machines better!.. Several reasons, in no particular order: * Debian based.. * Updated regularly (recent kernel, recent userspace readily available in daily snapshots).. * No GUI bloat I wouldn't need anyway.. * Excellent zsh config (I now install grml-scripts by default on most of my systems).. * Approachable developers.. * grml2usb.. * grml2ram.. * 64bit flavour available.. At a first view it seems to have a lot of possibilities in one place - ready to use, The best I ever have seen, I may say: Wonderful.. This was the more interesting part to me: Grml includes a collection of GNU/Linux software especially for system administrators and users of texttools.. Great hardware support and includes all the tools a sysadmin might need.. Tools Programs.. Unsurprisingly grml-x is the most used program.. Second most used Grml script is grml2usb which is a little bit surprising as it means that for installing Grml to an usb stick it wins over the dd(1) method for many people.. grml-network respectively netcardconfig is also expected as you sometimes need to configure your network.. grml-live is used more often than grml2hd (which BTW is unsupported) and grml-debootstrap.. This means that (at least for our participants) remastering is more common than installing Grml/Debian from within Grml.. This clearly shows that Grml can be considered as a framework for generating and maintaining flexible Live Distributions.. Surprisingly MirBSD is used less often than FreeDOS and gPXE.. For other mostly non Grml-specific tools were mentioned, as well as some not so well known Grml tools like grml-crypt (wrapper for cryptsetup) and grml-chroot (wrapper for chroot, binding /sys, /proc and /dev to the chroot) as well as grml-quickstart.. We plan to improve our documentation to cover those not so well known tools.. ssh (start an ssh server while booting), toram (copy the whole cd into ram) and lang (set the language) are the most commonly used bootoptions, covering the common use cases.. nofb at 20% was unexpected.. Probably there are quite a few machines where our default console configuration (framebuffer) does not work.. As one user requested a way to automatically start user-supplied scripts, we want to mention that there's already the script bootoption (see.. grml-cheatcodes.. Surprisingly forensic is also quite often mentioned as bootoption.. If you're interested in a special product on IT forensics you might want to check out.. Grml-Forensic.. Most common answers were fluxbox / wm-ng (Grml default) and None, right in line with our design target: a proper console.. Others mention several small window manager like ratpoison, dwm, i3 etc.. Because many window managers were mentioned we may reassess the (re)inclusion of some small window managers.. Several tools mentioned here are already included in Grml like for example KVM, others will not be included due to licensing issues.. For a complete list of packages shipped by Grml have a look at.. org/files/release-2010.. 12/dpkg_get_selections.. We are currently in the process of reviewing all suggested packages and may come up with details at a later date.. Future of Grml.. Grml-full seems to make sense as well as grml-small.. Grml-medium is not quite often used.. One interesting suggestion is to combine grml-small and grml-full on one CD.. We don't have any plans to ship this, but you can easily do this yourself with grml2iso.. Another suggestion was to create a special version for virtualised environments named grml-virt.. While grml-medium is not as well accepted as grml-small and grml-full in our community, we will continue to ship grml-medium as it's the perfect and recommended starting point for customized Grml distributions.. As already stated this question was not that helpful.. Nothing to comment besides the graphics and what has been mentioned already.. Although the X server isn't used that often on Grml, its users commonly want to use their favourite window manager.. As already stated we will reassess the (re)inclusion of some small window managers because of your answers.. Installation of Grml packages on Debian is a rare occurrence, except for grml2usb on Debian stable.. Consensus is to not put too much effort into it.. Besides some UX things like better artwork/no links (the browser) after startup in X.. org etc.. most feedback was quite positive.. We got some detailed suggestions like better wireless configuration, automatic selection of the kernel in multiarch environments, and others.. We are looking into your requests.. Anything else?.. We got some really nice ideas like inclusion of support for other boot images in our GRUB environment or multiarch CDs.. Better documentation as well as some How-tos was also mentioned several times.. Oh and more professionalism for our wallpapers.. It seems that at least in one work environment our wallpaper caused some blush.. This is again mainly positive things, so just some examples:.. I hate to disagree with the devs oft stated opinion, but grml is still the best desktop installer to create a usable desktop environment, because everything just works out of the box, and has no distro specific absurdities, like the famous debian forks.. Great distro, truley a masterpiece of work.. grml is 2 percent Jazz, 98 percent funky stuff.. It is great and it is debian.. Why don't you get rid of this strange ZSH and switch to the industry standard bash?!?! Haha, j/k :-).. Simple: Grml rocks! Thanks for the great work.. The answer must be, of course, 42.. United as one! Divided by zero!.. I like the cool distribution names!.. Thanks guys, I appreciate the work you've put into this distro.. Go to the top..

    Original link path: /survey2011-results/
    Open archive

  • Title: cheatcodes
    Original link path: /irc/
    (No additional info available in detailed archive for this subpage)

  • Title: grml.org - Team
    Descriptive info: The Grml Team.. Grml Developers.. Alexander Wirt (formorer).. Evgeni Golov (Zhenech).. Frank Terbeck (ft).. Michael Prokop (mika).. Thanks.. Adriana Teixera.. Alexander 'Leo' Bergolth.. Andreas Gredler.. Andrey Rahmatulli.. Antonio Diaz Diaz.. Axel Beckert.. Bernd Arnold.. Bernhard Tittelbach.. Carsten Hey.. Christian Hofstaedtler.. Christoph Biedl.. Eduard Bloch.. Gerfried Fuchs.. Gregor  ...   Haber.. Marek Straka.. Markus Rekkenbeil.. Martin Krafft.. Marvin Vek.. Michael Gebetsroither.. Michael Gissing.. Michael Stapelberg.. Michel Isard.. Peter Palfrader.. Richard Hartmann.. Sedat Dilek.. Sven Joachim.. Thomas Koehler.. Thorsten Glaser.. Timo Boettcher.. Tobias Klauser.. Tonnerre Lombard.. Ulrich Dangel.. Special Thanks.. Jogi Hofmüller and mur.. at: hosting grml mailinglists..

    Original link path: /team/
    Open archive

  • Title: kantan(8)
    Descriptive info: kantan(8).. Table of Contents.. JavaScript must be enabled in your browser to display the table of contents.. Name.. kantan - simple test suite for autotesting software using Grml and KVM.. Synopsis.. For the server (main) instance:.. kantan server disk.. img grml.. iso /mnt/point/of/iso/ [kvm_arguments].. or for client(s):.. kantan client disk.. img name [kvm_arguments].. For further details please see section.. [options].. [setup].. Options for.. kantan server.. :.. disk.. where.. img.. is an existing image file (created e.. via.. qemu-img create disk.. img 3G.. ), grml.. iso is an a Grml ISO (.. ), /mnt/point/of/iso/ refers to the mount point where the specified Grml ISO is mounted to (e.. mount -o loop grml-medium_sid_latest.. iso /mnt/test.. ) and.. kvm_arguments.. are optional and can be used to add additional arguments to the KVM commandline, like.. vga=791.. The /mnt/point/of/iso/ doesn t necessarily need to be a real mountpoint.. It s fine if you just copy linux26 and initrd.. gz from /boot/* of the Grml ISO to /path/to/foobar/boot/ and specify /path/to/foobar/ as mountpoint directory then.. kantan client.. ),.. name.. assigns the virtual instance a name (for reading /etc/kantan/name.. cfg iff the file exists).. -boot d.. for booting from the ISO.. Description.. Kantan is a set of scripts to automatically test software using KVM (.. linux-kvm.. ) and the Debian based Linux live system Grml (.. You don t have to set up neither tons of software packages nor a complex environment but just follow some simple.. setup instructions.. It was originally developed to provide a simple way for autotesting specific versions of FAI (.. http://fai-project.. ) but is expected to provide a simple-to-use test suite for autotesting any Linux based software.. The concept of Kantan is to boot one virtual machine (the main instance,.. kantan server.. ) which is supposed to be able to serve as installation server for further virtual machines if needed.. This concept for example allows to automatically set up a.. FAI.. server which then deploys further started virtual machines (the clients,.. kantan client.. Kantan is meant to be a prototype implementation to show how automated testing could be realised.. In the long run the author would like to get a suite to automatically test:.. complete Debian installations.. testing Debian packages within current state of Debian suites.. software configurations that are required to run on more than one host (installation procedures with dependencies between different systems during installation, cluster + HA setups, ).. live systems with their flexible boot options, specific features and services.. kernel versions.. software packages that provide unit tests.. low-level tools like partitioning, LVM, mdadm,.. filesystems (crash, repair, mount, ).. This software is WIP, though released in an early stage to gain feedback, testers and developers.. It s a prototype implementation mainly in shellscript but is expected to be rewritten in a real scripting language like python.. Requirements.. What you need to be able to use Kantan:.. a Debian (based) system (any other Linux system might do it as well, but the scripts and docs are optimised for Debian (based) systems for now).. a system running i386 or amd64 architecture (to smoothly use KVM).. at least 2GB of RAM are recommended.. at least 4GB of harddisk space for =2 virtual disk images.. a Grml ISO (see instructions below).. Setup and  ...   author of Kantan thinks that lack of proper Q/A is one of the most annoying issues in the open source world.. So let s do something against that.. What does Kantan mean?.. The author of Kantan is a friend of the.. Kanban.. concept and created the word Kantan based on "the Kanban of testing".. Amusingly according to.. cjvlang.. com/Writing/writjpn/signs/kantan.. "Kantan is a Chinese-style compound (on-reading) meaning.. simple.. " which represents the idea of Kantan: provide a.. method for testing software.. Why use a VM and not just a chroot?.. Chroots provide a nice way for testing stuff like package installations.. But they are limited to some restricted actions.. Chroots don t properly support testing kernel versions, bootoptions, partitioning tools, LVM, mdadm, in a reasonable environment.. How can I use Kantan with physical machines?.. By default Kantan uses vde_switch for network configuration.. This provides a working network setup between the server and the client(s) machines without having to configure anything.. But if you want to use external, physical machines this does not work any longer.. Instead just set up tap devices so you can install clients on real[tm] hardware.. Assume the following setup: the Kantan server is the server where you re executing "kantan server ".. The test client is the machine where you want to boot the system which would be corresponding to "kantan client " (but instead of executing "kantan client " as virtual guest you re running it on physical machine).. NIC eth0 is providing internet access (WAN).. NIC eth1 is the network link between the server and the client machine.. +----------------+ | Kantan ,-----|----- eth0 ----- [ Internet/WAN ] | Server | | | [tap1] | | | | | `-----|----- eth1 ----- [ Test client ] +----------------+.. Then the following configuration should do the trick for you:.. # example config for /etc/network/interfaces iface vnet inet static post-up tunctl -u grml -g grml -t tap1 ; brctl addif vnet tap1 ; ip link set up dev tap1 post-up brctl addif vnet eth1 pre-down ip link set down dev tap1 ; tunctl -d tap1 bridge_ports none address 192.. 10.. 2 netmask 255.. 255.. Configure /etc/kantan/server.. cfg:.. VLAN1_DEVICE='tap1'.. Then execute:.. ifup vnet echo 1 /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE.. To forward DNS requests from the clients to the physical net use dnsmasq:.. /etc/init.. d/dnsmasq start || apt-get install dnsmasq.. 8.. TODOs.. Known todos.. provide test features and tests from.. grml-unittests.. better logging and data sharing support to collect data and status report and control data flow between different virtual machines.. make sure vnc and serial console display the same things during execution within Grml.. netscript.. sh:.. support svn/git/ config space retrieval.. improve arch and suite support through base.. tgz.. support canceling the script and getting a debugshell.. Checkout.. use kvm s monitor support for sharing/controlling data?.. investigate and combine/merge features/ideas/approaches from:.. http://kvm.. et.. redhat.. com/page/KVM-Autotest.. http://lizards.. opensuse.. org/2010/05/25/automated-opensuse-testing/.. org/?p=grml-unittests.. git;a=summary.. mozilla.. org/projects/testopia/.. https://wiki.. com/AutomatedTesting.. com/AutomatedTestingDeployment.. com/Testing/ISO/Procedures.. edubuntu.. org/VirtFeatureVerification.. virtualsquare.. org/wiki/index.. php/VDE_Basic_Networking#Dump_or_Monitor_switch_traffic.. http://developer.. amd.. com/zones/opensource/AMDTapper/Pages/default.. aspx.. tools that might help in automated testing:.. GNU LDTP.. Selenium.. ShUnit.. Sikuli.. Tuitest.. Xautomation.. WebTest.. http://en.. wikipedia.. org/wiki/List_of_GUI_testing_tools.. 9.. Bugs.. We just need a test suite for Kantan for testing.. 10.. Author.. Michael Prokop.. mika@grml.. Last updated 2011-04-18 15:29:52 CEST..

    Original link path: /kantan/
    Open archive

  • Title: grml.org - Minutes of the Grml Developer Meeting 2010
    Descriptive info: Minutes of the Grml Developer Meeting 2010.. Data.. What: Official Grml Developer Meeting.. Date: 4th and 5th of november 2010.. Place:.. Metalab.. , Vienna/Austria.. Participants.. Alexander 'formorer' Wirt.. Andreas 'jimmy' Gredler.. Christian 'ch' Hofstaedtler.. Gerfried 'rhonda' Fuchs.. Michael 'gebi' Gebetsroither.. Michael 'mika' Prokop.. Ulrich 'mru' Dangel.. Some highlights.. formorer started to work on the new Grml Homepage and it looks great so far.. Maybe it is finished for the new release.. ch organized the location and social event and closed many bugs.. jimmy implemented a special update-grub feature for integrating Grml ISOs in usual hd installations during the meeting and debugged several issues.. gebi designed and started to develop a framework for non free tools like Raid controller or truecrypt (yes truecrypt is non-free!).. rhonda started to use Zsh and will be looking for fast mirrors outside of Europe.. mika was just amazed about the donations and what was achieved during these two days.. 1st day.. Ch, Uli and Mika starting with installation and buildup of work place in Metalab's library at 9:45.. Gebi, Jimmy and formorer are joining at ~10:15, Rhonda joins in the afternoon.. Official start at 10:35.. Starting with 98 open bugs, including 13 release stopper issues.. Small discussion about what is Grml and what should it be.. Artwork for upcoming release: different sizes of Tux.. Gebi will work on a framework for non-free tools for improved handling of hardware RAID controllers, truecrypt,.. We decided to not invest any time in non-free firmware as our current system works pretty well out-of-the-box already and if there should be need for further discussions around inclusion of non-free firmware people should report it.. Acknowledgment regarding main programming languages used within Grml: Shell and Python are to be prefered unless there are good reasons against it, exceptions need good reasoning.. grml-etc-core should ship /etc/gitconfig in the future (instead of /etc/skel/.. gitconfig for user-only config) to provide system wide configuration of some important defaults.. Detailed review of GRMLBASE software selection - the class is considered as base for any remastered ISOs and should provide software that either needs to be present because the live system wouldn't work otherwise or software we expect to get with every Grml based live system (lvm, madm, openssh,.. locales: /usr/share/locales shouldn't be removed overall but be made configurable (besides the already existing LOCALES class).. We decided to not provide any translations of neither our programs nor our documentation, but reviews by native english speakers would be good.. To improve visibility we decided (as a first step) to provide more mirrors outside DACH - Rhonda will take care of it.. Discussed redesign of new Website (formorer started working on it already).. Social Meeting in Vienna with two external guests with interesting and fulfilling discussions about Grml, Debian, Linux and the world.. First day involved a lot and interesting discussions and it was really helpful to get all personal ideas what Grml is and how we as a team can improve Grml.. 2nd day.. Starting at 10:00 with 88 open bugs in the BTS.. Work on update-grub for integration of a Grml-ISO in GRUB's bootmenu on harddisk installations, Jimmy takes care of it.. Discussed and researched possible grml-api solutions.. Currently grml-api is considered to not solve the real issues we're experiencing.. Instead we decided to improve cooperation amongst the essential tools as everything can be located implicitly.. We need better documentation regarding Grml-remastering, especially remastering official Grml-ISOs with grml-live using release-chroots, Mika and Ch will take care of it.. We will work on a central shell library which provides the most important functions to be shared amongst different scripts without having to adjust new features on several places, e.. like checkbootparams with its /cdrom/bootparams issue).. The library should be /bin/bash /bin/zsh compatible and must work under non Grml-systems as well.. Mika introduces his Kantan testsuite.. We  ...   company if you are using Grml!.. Polished and finalized a Grml User Survey which should go online soon.. Recruitment of new developers.. We will provide documentation how to submit patches and best practices on our new website.. Discussed sponsoring solutions for Grml:.. CDs USB-Sticks.. Developer Meeting (if you like such reports, donate!).. Server Housing.. Google Summer of Code - try to get accepted: Possible projects:.. grml-live Webinterface/GUI.. Testing framework for arbitrary Linux distributions.. Integration of systemd in Debian (and Grml).. Developer policy: what happens with inactive developers? If someone is inactive for a long time the project members decide about grading a core developer to contributor to avoid misusage of permissions within the project.. Gebi worked on a cdrecord version 3 package based on Mika's previous packaging work.. It will be provided on the Grml mirror but.. shipped on the CD by default.. Improve documentation of necessary tests for a Grml-Release and the Grml release process itself.. We need to save some space as current grml-full ISOs are over 700MB.. Started discussion about software packages in GRML_FULL.. Ch provided a list of removal candidates for all packages within a-h.. Ch already provided test ISOs under 700MB (without addons).. Xorg.. KMS is the future.. Don't ship xorg.. conf configuration per default anymore, X auto configuration is quite good nowadays.. Ch already provided a new grml-x dealing with the new specification, WIP.. New Kernel 2.. 6.. 36 is out.. Gebi and Mika will take care of it and unless there are release stoppers it will be provided with upcoming stable release.. We need information for the release notes:.. vnc_connect.. kms.. new kernel.. further new features (in grml-etc-core, grml-etc, grml-live,.. Split grml-scripts in grml-scripts-core and grml-scripts.. grml-scripts-core should only contain the software needed in grml-etc-core.. Cleanup of grml-scripts and grml-network.. Reorganize grub templates for menus like the isolinux ones.. Change grml-rebuildfstab to only modify current device and do not scan whole system on every event.. Code reviews: we won't use an extra tool but push work in separate branches inside git and ask the according maintainer and/or other developers for feedback.. The workflow with merge + signed-off will be documented accordingly.. Workflow for Debian packaging/VCS: Mika presented his git-dch/git-buildpackage workflow - will be documented properly.. As soon as the workflow is documented uploads for all core developers to grml-testing at deb.. org will be enabled.. Improve Grml page in german and english wikipedia, needs updates to reflect recent developement.. Rhonda will take care of it.. Grml-Monster: we would like to get our own mascot with appropriate license for distribution.. Would be nice to have a directory specific configuration for grml-live, Mika wants to take care of it.. Finished bug squashing with 84 open bugs, only 6 open release stoppers of which some are already pending.. Assigned main open tasks to each developer.. Official end of developer meeting at 19:30 and starting cleanup of used Metalab space.. Financial details.. Transportation, accommodation costs and the social event added up to 840 EUR.. Thanks to generous private donations as well as sponsoring by.. Tarent.. the full amount of costs could be covered.. Accounting is WIP these days, if any money should be left we will save the money for the next upcoming Grml developer meeting.. Thanks a lot to everyone of you who supported the Grml team through donations!.. Thanks to generous sponsors for financially supporting the developer meeting.. Thanks to.. for their kindly hosting in their hacker space.. It was really amazing what we achieved during these two days and it was really helpful to meet everyone in person.. This event and this report would not be possible without many generous sponsors and the friendly hosting by Metalab! We want to thank you all!.. This document was prepared by Michael Prokop and Ulrich Dangel.. Latest change: Mit Nov 10 23:23:44 CET 2010..

    Original link path: /reports/devmeeting_2010/
    Open archive

  • Archived pages: 58