mktemp
DevelopersTodd Miller, Jim Meyering
Release1997; 29 years ago (1997)
Written inC
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand

mktemp is a command available in many Unix-like operating systems that creates a temporary file or directory.[1] Originally released in 1997 as part of OpenBSD 2.1,[2] a separate implementation exists as a part of GNU Coreutils.[3]

There used to be a similar named C library function, which is now deprecated for being unsafe, and has safer alternatives.[4]

See also

edit

References

edit
  1. ^ "mktemp". Linux Standard Base Core Specification 3.1. Free Standards Group. Retrieved 7 November 2015.
  2. ^ Miller, Todd C. "mktemp manual page". Retrieved 7 November 2015.
  3. ^ Meyering, Jim (7 October 2007). "announce: new program: mktemp" (Mailing list). Retrieved 7 November 2015.
  4. ^ "Temporary Files". GNU. GNU. Retrieved 2 September 2019.

📚 Artikel Terkait di Wikipedia

Time-of-check to time-of-use

had an exploitable race condition for temporary files because it used the mktemp() function. Early versions of OpenSSH had an exploitable race condition

TMPDIR

e.g. per the Single UNIX Specification. Filesystem Hierarchy Standard mktemp Unix filesystem "Environment Variables". Pubs.opengroup.org. Retrieved 26

GNU Core Utilities

Creates named pipes (FIFOs) mknod – Creates block or character special files mktemp – Creates temporary regular files or directories mv – Moves and renames

Toybox

using crypt(3). mkswap — Set up a Linux swap area on a device or file. mktemp — Safely create a new file "DIR/TEMPLATE" and print its name. modinfo —

BusyBox

Create a folder mkdosfs mkfifo mkfs.minix mkfs.vfat mknod mkpasswd mkswap mktemp modprobe more — View FILE or standard input one screen-full at a time mount

Linux from Scratch

4.1 man 1.6e man-db 2.13.1 Man pages 6.15 MarkupSafe 3.0.2 Meson 1.8.3 mktemp 1.5 Module-Init-Tools 3.4 mpc 1.3.1 GNU MPFR 4.2.2 ncurses 6.5.20250809

Temporary file

library functions. Some systems provide the former POSIX (now removed) mktemp(1) program. These files are typically located in the standard temporary

Symlink race

to safely create temporary files. For shell scripts, the system utility mktemp(1) does the same thing. "CAPEC-27: Leveraging Race Conditions via Symbolic