Qshell utility features

There are over 100 utilities provided with Qshell that provide many functions.

There are over 100 utilities provided with Qshell that provide many functions. A utility is one of two types:

  • A built-in utility is one qsh can run directly without having to search for it. It runs in the same process as the shell interpreter.
  • A regular utility is a separate program object that qsh finds by searching for it. It runs in a new process started by the shell interpreter.

A Qshell utility has the following format. The square brackets indicate something that is optionally specified.


utility [ options ] [ parameters ]

Some utilities allow single letter options preceded by a minus sign (-). For example, several utilities use the -r option for recursively working on a directory tree. More than one option can be specified and all options must be specified before any parameters. If a parameter begins with a minus sign, you can use the -- option to indicate the end of options. For example, in the command line


utility -r -- -1

the -1 is treated as a parameter because the -- marked the end of the options.

Navigating in the Integrated File System

When navigating in the Integrated File System, you always have a current working directory. If a file or directory is specified without a leading slash (/), it is assumed to be in the current working directory.

You can change the current working directory with the cd utility. For example to change the current working directory to /usr/bin, use this command:


cd /usr/bin

You can display your current working directory with either the pwd or pwdx utilities. The pwdx utility resolves symbolic links and displays the absolute current working directory.

You can list the contents of a directory with the ls utility. With no parameters, ls lists the contents of the current working directory. You can also specify one or more directories as parameters. With the -l (lowercase ell) option, ls lists detailed information about each object in the directory, including the permissions for the object, the owner and group of the object, the size of the object, and the date that the object was last accessed.

Working with files and directories

You can create a new directory with the mkdir utility. When the -p option is specified, mkdir creates all of the directories in the path. For example, to create the new directories "/fruits" and "/fruits/pears", use this command:


mkdir -p /fruits/pears

You can copy files with the cp utility. For example, to copy the file "/fruits/apples/delicious" to the file "/fruits/apples/grannysmith", use this command:


cp /fruits/apples/delicious /fruits/apples/grannysmith

You can rename or move objects with the mv utility. For example, to move the file orange in the current directory to the file "tangerine" in the "/fruits" directory, use this command:


mv orange /fruits/tangerine

You can delete an object with the rm utility and delete a directory with the rmdir utility. When the -r option is specified, rm recursively deletes all of the objects in a directory tree. This is an easy way to delete a large number of objects with one command. For example, to delete all of the files and directories in the "/fruits" directory tree, use this command:


rm -r /fruits