注意:
The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Package:Coreutils
Jump to navigation
Jump to search
Coreutils
Tip
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
The core utils package provides many essential Linux binaries: (Note that in some other distros, all these binaries exist in /usr/bin and /bin itself is a symlink to /usr/bin)
<
Binary name | Binary function | Common Usage |
---|---|---|
/bin/basename | Remove leading directory components from a given directory listing. | |
/bin/cat | Used to concatenate files and print them to stdout. | cat file1 file2... cat file |
/bin/chgrp | Used to change group ownership | chgroup group /path/filename |
/bin/chmod | change file mode bits | |
/bin/chown | Change file ownership and group membership | chown user:group filename chown -R user:group dirname |
/bin/chroot | Temporarily changes the current root to the specified path | chroot /newrootpath/ |
/bin/cp | copy files and directories | cp /path/file1 /path/file2 |
/bin/cut | remove sections from each line of files | |
/bin/date | print or set the system date and time | |
/bin/dd | convert and copy a file | |
/bin/df | report file system space usage | df -h mountpoint |
/bin/dir | strip last component from file name | |
/bin/dirname | strip last component from file name | |
/bin/du | estimate file space usage | du /path/ du -h /path/ |
/bin/echo | display a line of text | echo "hello world" |
/bin/env | run a program in a modified environment | |
/bin/expr | evaluate expressions | |
/bin/false | do nothing, unsuccessfully | |
/bin/head | output the first part of files | |
/bin/ln | Create hard and symbolic links between different files. | |
/bin/ls | List files and directories on the filesystem | ls -alh /home/username/ |
/bin/mkdir | Create a new, empty directory | mkdir /path/dirname mkdir -p /path/all/these/dirs/are/new |
/bin/mkfifo | make FIFOs (named pipes) | |
/bin/mknod | make block or character special files | |
/bin/mktemp | create a temporary file or directory | |
/bin/mv | Move a file to a different location on the filesystem. | |
/bin/pwd | Output the Present Working Directory. | mv /path/oldfile /newpath/newfile |
/bin/readlink | print resolved symbolic links or canonical file names | |
/bin/rm | Remove a file, directory, etc. from the filesystem. | rm /path/filename |
/bin/rmdir | Remove a directory from the filesystem. | rmdir /path/dirname |
/bin/seq | print a sequence of numbers | |
/bin/sleep | delay for a specified amount of time | sleep 10 |
/bin/sort | sort lines of text files | |
/bin/stty | change and print terminal line settings | |
/bin/sync | Synchronize cached writes to persistent storage | |
/bin/tail | output the last part of files | tail /var/log/messages |
/bin/touch | Create an empty file on the filesystem. | touch /path/filename |
/bin/tr | translate or delete characters | |
/bin/true | do nothing, successfully | |
/bin/tty | print the file name of the terminal connected to standard input | |
/bin/uname | print system information | uname -a |
/bin/vdir | list directory contents | |
/bin/wc | print newline, word, and byte counts for each file | |
/bin/yes | output a string repeatedly until killed | |
/usr/bin/[ | tests the subsequent expression for truth | |
/usr/bin/arch | prints the machine architecture, alias for /bin/uname -m | |
/usr/bin/b2sum | calculates the BLAKE2 checksum of the input | |
/usr/bin/base32 | Base32 encodes/decodes the given file or input | |
/usr/bin/base64 | Base64 encodes/decodes the given file or input | |
/usr/bin/basenc | encodes/decodes the given file or input using the specific encoding | |
/usr/bin/chcon | change the SELINUX security context of the given file | |
/usr/bin/cksum | calculates the checksum of the given file using the specified algorithm | |
/usr/bin/comm | compare two sorted files line by line | |
/usr/bin/csplit | use patterns to split a file's content | |
/usr/bin/dircolors | outputs commands to set colours used in ls output | |
/usr/bin/expand | converts tab characters to blocks of multiple space characters | |
/usr/bin/factor | Print the prime factors of the specified integer number | |
/usr/bin/fmt | Simple text paragraph formatter | |
/usr/bin/fold | Wraps long lines in given file to specified width | |
/usr/bin/hostid | Prints the numeric(hexdecimal) ID of the current machine | |
/usr/bin/id | Prints the user and group IDs of the specified or current user | |
/usr/bin/install | Copies files and sets attributes | |
/usr/bin/join | Joins lines of two files on a common field | |
/usr/bin/link | Creates hard links to files, no error checking | |
/usr/bin/logname | Print login name of current user | |
/usr/bin/md5sum | Calculates the MD5 hash of the given file or input | |
/usr/bin/nice | Makes a CPU heavy program yield to other processes | |
/usr/bin/nl | Add line numbers to a file | |
/usr/bin/nohup | Prevents a process from terminating when the parent terminal exits | |
/usr/bin/nproc | prints the number of processors | |
/usr/bin/numfmt | convert number formats | |
/usr/bin/od | ||
/usr/bin/paste | ||
/usr/bin/pathchk | check whether filenames are valid and/or portable between OSes | |
/usr/bin/pinky | lightweight client for the finger protocol | |
/usr/bin/pr | Converts the given file for printing to a printer | |
/usr/bin/printenv | prints environment variables | |
/usr/bin/printf | Formats data for output | |
/usr/bin/ptx | ||
/usr/bin/realpath | print full resolved path (i.e follows symlinks) | |
/usr/bin/runcon | Run given command with specified SELINUX security context | |
/usr/bin/sha1sum | Calculates the SHA1 hash of the given file or input | |
/usr/bin/sha224sum | Calculates the SHA224 hash of the given file or input | |
/usr/bin/sha256sum | Calculates the SHA256 hash of the given file or input | |
/usr/bin/sha384sum | Calculates the SHA384 hash of the given file or input | |
/usr/bin/sha512sum | Calculates the SHA512 hash of the given file or input | |
/usr/bin/shred | Irreversibly destroy the given file(s) | |
/usr/bin/shuf | Generate random permutations of input lines/files | |
/usr/bin/split | split a file into parts | |
/usr/bin/stat | display file or file system statistics | |
/usr/bin/stdbuf | run command with modified buffers | |
/usr/bin/sum | calculates BSD checksum for given file | |
/usr/bin/tac/td> | similar to /bin/cat, but works backwards | |
/usr/bin/tee | ||
/usr/bin/test | tests the subsequent expression for truth | |
/usr/bin/timeout | sets a timeout on the given command | |
/usr/bin/truncate | shrink or enlarge the given file (can be destructive) | |
/usr/bin/tsort | topological sort the given file | |
/usr/bin/unexpand | converts blocks of multiple space characters to tabs | |
/usr/bin/uniq | remove adjacent duplicate lines from given file or input | |
/usr/bin/unlink | removes given file from the filesystem | |
/usr/bin/users | print a list of logged-in users | |
/usr/bin/who | prints a list of logged-in users | |
/usr/bin/whoami | prints effective username of the current user |
The following core utils in /usr/bin are symlinks to their counterpart in /bin:
basename |
chroot |
cut |
dir |
dirname |
du |
env |
expr |
head |
mkfifo |
mktmp |
readlink |
seq |
sleep |
sort |
tail |
touch |
tr |
tty |
uname |
vdir |
wc |
yes |