Where everything is stored

The default BlackBerry 10 OS file system generally follows the File system hierarchy standard, but we don't claim to be compliant or compatible with it. This standard describes where files and directories should or must be placed in UNIX-style operating systems. For more information, see http://www.pathname.com

The BlackBerry 10 OS pathname space is extremely flexible. Your system may be configured differently.

This section describes the contents of these directories:

Diagram showing the directories under /. /var /usr /tmp /sbin /root /lib /home /fs /etc /dev /boot /bin / /proc

/

The / directory is the root of the pathname space. Usually your primary hard disk or flash file system is mounted here. The / directory also contains platform-specific directories (for example, armle, x86), as well as the directories described in the sections that follow.

/bin

The /bin directory contains binaries of essential utilities, such as chmod, ls, and ksh. To display basic utility syntax, type use utilityname from the command line. For more information, see use in Utilities.

/boot

The /boot directory contains files and directories related to creating bootable OS images (image filesystems). Image file systems contain OS components, your executables, and data files that need to be present and running immediately upon bootup. This directory includes:

/boot/build/
This directory contains the mkifs buildfiles used to build OS images. The buildfiles for a standard x86-based BlackBerry 10 OS system are qnxbase.build and qnxbasedma.build.
/boot/fs/
By convention, we use this directory to store image file systems built by mkifs. To boot from one of the images, you need to copy it to /.boot on a bootable Power-Safe device first.
/boot/sys/
IPL and startup code are located here. This is one of the paths searched by the mkifs utility as it tries to resolve components named in the buildfile.

/dev

The /dev directory belongs to the process manager and contains device files. The files that this directory includes may include:

/dev/cd n
CD-ROM block devices; see devb-* in Utilities for driver information.
/dev/console
The device that's used for diagnostic log messages; on a full x86 system, this is a write-only device managed by the system logger, slogger . Buildfiles for embedded systems may configure a link from this path to another device, such as a serial port. See slogger in Utilities.
/dev/hd n
Hard disk block devices; data representing an entire drive, spanning all partitions; see devb-* in Utilities.
/dev/hd n t n
Hard disk partition block devices; the data in these devices is a subset of that represented by the corresponding hd n file; see devb-* in Utilities.
/dev/io-net/
A directory owned and operated by io-pkt* , under which you can find files relating to the network devices for your various LANs. C programs can perform devctl() operations on these files to interact with the driver, for example, to obtain driver statistics.

Only legacy io-net drivers create entries under /dev/io-net/; native io-pkt* drivers don't.

/dev/mem
A device that represents all physical memory.
/dev/null
A bit bucket that you can direct data to. The data is discarded.
/dev/pci
Adopted by the PCI server on the machine, this device lets programs communicate with the PCI server. See pci-* in Utilities.
/dev/pipe
Adopted by the pipe manager. The presence of this file tells other programs (such as a startup script built into an OS image) that the Pipe manager is successfully running.
/dev/pty[p-zP-T][0-9a-f]
The control side of a pseudo-terminal device pair. Pseudo-ttys are named with a letter (p–z or P–T) followed by a hexadecimal digit, making it possible to have up to 256 devices. See devc-pty in Utilities.
/dev/random
Read from this device to obtain random data; see random in Utilities.
/dev/sem
A pathname space where entries for named semaphores appear.
/dev/ser n
Serial ports. See stty for configuration, and devc-ser* for driver details in Utilities.
/dev/shmem/
Contains files representing shared memory regions on the system (also sometimes used for generic memory-mapped files). For more information, see the description of the RAM file system in Working with file systems.
/dev/slog
A device managed by slogger , used to read or write system log messages. Try sloginfo /dev/slog. See slogger and sloginfo in Utilities for more information.
/dev/socket/
This directory is owned and managed through the TCP/IP stack, which is included in io-pkt* . This directory contains pathnames through which applications interact with the stack.
/dev/text
This file is managed by procnto . Text written to this device is output through debug output routines encoded in the startup code for your system.

The actual result, therefore, varies from board to board. On a standard PC (using startup-BIOS), the default is to write to the PC console. For more information, see startup-* in Utilities.

/dev/tty
A virtual device owned by the process manager ( procnto ) that resolves to the controlling terminal device associated with the session of any process that opens the file. This is useful for programs that may have closed their standard input, standard output, or standard error, and later want to write to the terminal device.
/dev/tty[p-zP-T][0-9a-f]
The slave side of the corresponding /dev/pty[p-zP-T][0-9a-f] file. The program being controlled typically uses one of these files for its standard input, standard output, and standard error.
/dev/zero
Supplies an endless stream of bytes having a value of zero.

/etc

The /etc directory contains host-specific system files and programs used for administration and configuration. These files include:

/etc/default/
A directory that contains default configuration files, primarily for TCP/IP facilities.
/etc/dhcpd.conf
Dynamic Host Configuration Protocol configuration; see /etc/dhcpd.conf in Utilities.
/etc/group
User account group definitions.
/etc/hosts
Network hostname lookup database; see /etc/hosts in Utilities.
/etc/inetd.conf
Internet super-server configuration file that defines Internet services that inetd starts and stops dynamically as needed.

The descriptions in the default version of this file are commented out; uncomment the ones that you want to use. See /etc/inetd.conf in Utilities.

/etc/rc.d/
A directory where you usually keep local system-initialization files.
/etc/system/
A directory that includes files and directories used when you boot the system, including:
  • /etc/system/sysinit—the main script for initializing the system.
  • /etc/system/enum—the location of configuration files for the enumerators.

/fs

Additional file systems are mounted under /fs. See Working with file systems, and devb-* and mount in Utilities. This directory can include the following subdirectories:

/fs/cd n /
CD-ROM file systems.
/fs/fd n /
Floppy disk file systems.
/fs/hd n - type [- number ]/
file systems on hard disk partitions.

/home

The home directories of regular users are found here. The name of your home directory is often the same as your user name.

/lib

This directory contains essential shared libraries that programs need to run (filename .so), as well as static libraries used during development. See also /usr/lib and /usr/local/lib. The /lib directory includes:

/lib/dll/
Contains additional shared libraries that implement OS drivers and services, such as drivers, file system managers, and so on. For some examples of how shared libraries are used for certain types of drivers and services, see file systems, and TCP/IP Networking in the System architecture guide. For details about specific shared objects in the /lib/dll directory, see their respective entries in Utilities.

/proc

Owned by the process manager (procnto), this virtual directory can give you information about processes and pathname-space configuration. The /proc directory contains a subdirectory for each process; the process ID is used as the name of the directory. These directories each contain an entry (as) that defines the process's address space. Various utilities use this entry to get information about a process. For more information, see Controlling processes via the /proc file system in the BlackBerry 10 OS Programmer's guide.

The /proc directory also includes:

/proc/boot/
The image file system that comprises the boot image.
/proc/dumper
A special entry that receives notification when a process terminates abnormally. The dumper utility watches this entry.
/proc/mount/
Pathname-space mountpoints.

If you list the contents of the /proc directory, /proc/mount doesn't show up, but you can list the contents of /proc/mount.

/proc/self/
The address space for yourself (that is, for the process that's making the query).

/root

The /root directory is the home directory for the root user.

/sbin

his directory contains essential system binaries. The /sbin directory includes the following:

/tmp

This directory contains temporary files. Programs are supposed to remove their temporary files after using them, but sometimes they don't, either due to poor coding or abnormal termination. You can periodically clean out extraneous temporary files when your system is idle.

/usr

The /usr directory is a secondary file hierarchy that contains shareable, read-only data. It includes the following:

/usr/bin/
A directory that contains most user commands.
/usr/include/
The top of a directory structure that contains the C and C++ header files. This directory includes sys, platform-specific, and other directories.
/usr/info/
Documentation for various utilities.
/usr/lib/
Object files, libraries, and internal binaries that you shouldn't execute directly or in scripts. You can link against these libraries, if you write any programs.
/usr/libexec/
A directory that could contain system daemons and system utilities; in general, these are run only by other programs.
/usr/local/
A directory where the system administrator can install software locally. It's initially empty.
/usr/man/
Manual pages for various utilities.
/usr/qde/
The top of a directory structure that contains executables, data files, plugins, and so on, associated with the Integrated Development Environment (IDE) on Linux and Windows.
/usr/sbin/
Nonessential system binaries, such as dumper , and nicinfo .
/usr/share/
Data that's independent of the architecture, such as icons, backdrops, and various gawk programs.
/usr/src/
A directory for source code.

/var

The /var directory contains variable data files, including cache files, lock files, log files, and the dumps subdirectory.

/var/dumps
The directory where dumper saves any dumps that result when a program terminates abnormally.

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus