Stat (Unix)
is a Unix system call that queries the file system for metadata about a computer file, file (including Unix file type, special files such as computer directory, directories). The metadata contains many fields including Unix file type, type, file size, size, ownership, File-system permissions, permissions and Unix time, timestamps. For example, the ls, command uses this system call to retrieve timestamps: * mtime: when last modified () * atime: when last accessed () * ctime: when last status changed () appeared in Research Unix#Versions, Version 1 Unix. It is among the few original Unix system calls to change, with Research Unix#Versions, Version 4's addition of group permissions and larger file size. Since at least 2004, the same-named shell (computing), shell command (computing), command stat has been available for Linux to expose features of the system call via a command-line interface. Functions The C POSIX library header , found on POSIX and other Unix-like operating ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Coreutils Stat Screenshot
The GNU Core Utilities or coreutils is a collection of GNU software that implements many standard, Unix-based shell (computing), shell command (computing), commands. The utilities generally provide POSIX compliant interface when the environment variable is set, but otherwise offers a superset to the standard interface. For example, the utilities support command-line interface#Option conventions in Unix-like systems, long options and options after parameters. This environment variable enables a different functionality in BSD. Similar collections are available in the Free and open-source software, FOSS ecosystem, with a slightly different scope and focus (less functionality), or license. For example, BusyBox which is licensed under GNU General Public License, GPL-2.0-only, and Toybox which is licensed under BSD licenses, 0BSD. Commands The commands implemented by coreutils are listed below. Throughout this article and customary for Unix-based systems, the term ''file'' refers t ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
C POSIX Library
The C POSIX library is a specification of a C standard library for POSIX systems. It was developed at the same time as the ANSI C standard. Some effort was made to make POSIX compatible with standard C; POSIX includes additional functions to those introduced in standard C. On the other hand, the 5 headers that were added to the C standard library with C11, were not likewise included in subsequent revisions of POSIX. It may be included in any C++ project, however the C++ standard library may have its own implementation of certain features, such as rather than , rather than , or rather than . C POSIX library header files See also * POSIX * C standard library * C++ standard library The C standard library, sometimes referred to as libc, is the standard library for the C programming language, as specified in the ISO C standard.ISO/ IEC (2018). '' ISO/IEC 9899:2018(E): Programming Languages - C §7'' Starting from the origina ... References Official List of headers in the ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Unix File Types
The Unix file types are the categories of file formats that a Unix-based system uses to provide context-sensitive behavior of file system items all of which called ''files'' in Unix-based systems. POSIX defines categories: regular, Directory (computing), directory, symbolic link, Named pipe, FIFO special, Device file, block special, character special, and Unix domain socket, socket. An operating system may define additional categories (e.g. Solaris Doors (computing), doors). A regular file is any file format that the file system does not know and relies on applications to manipulate. The other categories are for file formats that the file system inherently knows and can manipulate. The ls, ls -l command reports a file's category via the character before the File-system permissions#Notation of traditional Unix permissions, permissions information. The File (command), file command reports file format information; even for regular files. Representations Numeric The type of a f ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Bit Field
A bit field is a data structure that maps to one or more adjacent bits which have been allocated for specific purposes, so that any single bit or group of bits within the structure can be set or inspected. A bit field is most commonly used to represent Primitive data type, integral types of known, fixed bit-width, such as single-bit Boolean data type, Booleans. The meaning of the individual bits within the field is determined by the programmer; for example, the first bit in a bit field (located at the field's base address) is sometimes used to determine the state of a particular attribute associated with the bit field. Within CPUs and other logic devices, collections of bit fields called flags are commonly used to control or to indicate the outcome of particular operations. Processors have a status register that is composed of flags. For example, if the result of an addition cannot be represented in the destination an arithmetic overflow is set. The flags can be used to decide subs ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Inode
An inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data. A directory is a list of inodes with their assigned names. The list includes an entry for itself, its parent, and each of its children. Etymology There has been uncertainty on the Linux kernel mailing list about the reason for the "i" in "inode". In 2002, the question was brought to Unix pioneer Dennis Ritchie, who replied: A 1978 paper by Ritchie and Ken Thompson bolsters the notion of "index" being the etymological origin of inodes. They wrote: Additionally, Maurice J. Bach wrote that the word ''inode'' "is a contraction of the term index node and is commonly used in literature on the UNIX system". Details A file system ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Device File
In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions. Overview Device files usually provide simple interfaces to standard devices (such as printers and serial ports), but can also be used to access specific unique resources on those devices, such as disk partitions. Additionally, device files are useful for accessing system resources that have no connection with any actual device, such as data sinks and random number generators. There are two general kinds of device files in Unix-like operating syst ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
C Macro
The C preprocessor (CPP) is a text file processor that is used with C, C++ and other programming tools. The preprocessor provides for file inclusion (often header files), macro expansion, conditional compilation, and line control. Although named in association with C and used with C, the preprocessor capabilities are not inherently tied to the C language. It can and is used to process other kinds of files. C, C++, and Objective-C compilers provide a preprocessor capability, as it is required by the definition of each language. Some compilers provide extensions and deviations from the target language standard. Some provide options to control standards compliance. For instance, the GNU C preprocessor can be made more standards compliant by supplying certain command-line flags. The C# programming language also allows for directives, even though they cannot be used for creating macros, and is generally more intended for features such as conditional compilation. C# seldom requ ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Large File Support
Large-file support (LFS) is the term frequently applied to the ability to create files larger than either 2 or 4 GiB on 32-bit filesystems. Details Traditionally, many operating systems and their underlying file system implementations used 32-bit integers to represent file sizes and positions. Consequently, no file could be larger than 232 − 1 bytes (4 GiB − 1). In many implementations, the problem was exacerbated by treating the sizes as signed numbers, which further lowered the limit to 231 − 1 bytes (2 GiB − 1). Files that were too large for 32-bit operating systems to handle came to be known as ''large files''. While the limit was quite acceptable at a time when hard disks were smaller, the general increase in storage capacity combined with increased server and desktop file usage, especially for database and multimedia files, led to intense pressure for OS vendors to overcome the limitation. In 1996, multiple vendors responded by forming an industry initiat ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
File Descriptor
In Unix and Unix-like computer operating systems, a file descriptor (FD, less frequently fildes) is a process-unique identifier (handle) for a file or other input/output resource, such as a pipe or network socket. File descriptors typically have non-negative integer values, with negative values being reserved to indicate "no value" or error conditions. File descriptors are a part of the POSIX API. Each Unix process (except perhaps daemons) should have three standard POSIX file descriptors, corresponding to the three standard streams: Overview In the traditional implementation of Unix, file descriptors index into a per-process maintained by the kernel, that in turn indexes into a system-wide table of files opened by all processes, called the . This table records the ''mode'' with which the file (or other resource) has been opened: for reading, writing, appending, and possibly other modes. It also indexes into a third table called the inode table that describes the ac ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Symbolic Link
In computing, a symbolic link (also symlink or soft link) is a file whose purpose is to point to a file or directory (called the "target") by specifying a path thereto. Symbolic links are supported by POSIX and by most Unix-like operating systems, such as FreeBSD, Linux, and macOS. Support also exists in Windows 10 and 11. CTSS on IBM 7090 had files linked by name in 1963. By 1978 minicomputer operating systems from DEC, and in Data General's RDOS included symbolic links. Overview A symbolic link contains a text string that is automatically interpreted and followed by the operating system as a path to another file or directory. This other file or directory is called the "target". The symbolic link is a second file that exists independently of its target. If a symbolic link is deleted, its target remains unaffected. If a symbolic link points to a target, and sometime later that target is moved, renamed or deleted, the symbolic link is not automatically updated or deleted, b ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Path (computing)
A path (or filepath, file path, pathname, or similar) is a text string that uniquely specifies an item in a hierarchical file system. Generally, a path is composed of directory names, special directory specifiers and optionally a filename, separated by delimiting text. The delimiter varies by operating system and in theory can be anything, but popular, modern systems use slash , backslash , or colon . A path can be either relative or absolute. A relative path includes information that is relative to a particular directory whereas an absolute path indicates a location relative to the system root directory, and therefore, does not depends on context like a relative path does. Often, a relative path is relative to the working directory. For example, in command , is a relative path to the file with that name in the working directory. Paths are used extensively in computer science to represent the directory/file relationships common in modern operating systems and are essential ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |
|
Errno
errno.h is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno (short form for "error number").International Standard for Programming Language C (C11), ISO/IEC 9899:2011, p. 205 errno acts like an integer variable. A value (the error number) is stored in errno by certain library functions when they detect errors. At program startup, the value stored is zero. Library functions store only values greater than zero. Any library function can alter the value stored before return, whether or not they detect errors.International Standard for Programming Language C (C99), ISO/IEC 9899:1999, p. 186 Most functions indicate that they detected an error by returning a special value, typically NULL for functions that return pointers, and -1 for functions that return integers. A few functions require the caller to preset errno to zero and test it afterwards to see if an error was detected. ... [...More Info...]       [...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   |