You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
9819 lines
405 KiB
HTML
9819 lines
405 KiB
HTML
<!DOCTYPE HTML>
|
||
<html lang="en" class="sidebar-visible no-js light">
|
||
<head>
|
||
<!-- Book generated using mdBook -->
|
||
<meta charset="UTF-8">
|
||
<title>uutils Documentation</title>
|
||
<meta name="robots" content="noindex" />
|
||
|
||
|
||
<!-- Custom HTML head -->
|
||
<style>
|
||
dd {
|
||
margin-bottom: 1em;
|
||
}
|
||
main {
|
||
position: relative;
|
||
}
|
||
.additional {
|
||
position: absolute;
|
||
top: 0.5em;
|
||
right: 0;
|
||
display: flex;
|
||
gap: 5px;
|
||
align-items: center;
|
||
font-size: 1.3em;
|
||
}
|
||
.platforms {
|
||
font-size: 2rem;
|
||
}
|
||
dd > p {
|
||
margin-top: 0.2em;
|
||
}
|
||
</style>
|
||
|
||
<meta name="description" content="">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="theme-color" content="#ffffff" />
|
||
|
||
<link rel="icon" href="favicon.svg">
|
||
<link rel="stylesheet" href="css/variables.css">
|
||
<link rel="stylesheet" href="css/general.css">
|
||
<link rel="stylesheet" href="css/chrome.css">
|
||
<link rel="stylesheet" href="css/print.css" media="print">
|
||
|
||
<!-- Fonts -->
|
||
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
|
||
<link rel="stylesheet" href="fonts/fonts.css">
|
||
|
||
<!-- Highlight.js Stylesheets -->
|
||
<link rel="stylesheet" href="highlight.css">
|
||
<link rel="stylesheet" href="tomorrow-night.css">
|
||
<link rel="stylesheet" href="ayu-highlight.css">
|
||
|
||
<!-- Custom theme stylesheets -->
|
||
|
||
</head>
|
||
<body>
|
||
<div id="body-container">
|
||
<!-- Provide site root to javascript -->
|
||
<script>
|
||
var path_to_root = "";
|
||
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
|
||
</script>
|
||
|
||
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||
<script>
|
||
try {
|
||
var theme = localStorage.getItem('mdbook-theme');
|
||
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||
|
||
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||
}
|
||
|
||
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||
}
|
||
} catch (e) { }
|
||
</script>
|
||
|
||
<!-- Set the theme before any content is loaded, prevents flash -->
|
||
<script>
|
||
var theme;
|
||
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||
if (theme === null || theme === undefined) { theme = default_theme; }
|
||
var html = document.querySelector('html');
|
||
html.classList.remove('no-js')
|
||
html.classList.remove('light')
|
||
html.classList.add(theme);
|
||
html.classList.add('js');
|
||
</script>
|
||
|
||
<!-- Hide / unhide sidebar before it is displayed -->
|
||
<script>
|
||
var html = document.querySelector('html');
|
||
var sidebar = null;
|
||
if (document.body.clientWidth >= 1080) {
|
||
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||
sidebar = sidebar || 'visible';
|
||
} else {
|
||
sidebar = 'hidden';
|
||
}
|
||
html.classList.remove('sidebar-visible');
|
||
html.classList.add("sidebar-" + sidebar);
|
||
</script>
|
||
|
||
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||
<div class="sidebar-scrollbox">
|
||
<ol class="chapter"><li class="chapter-item expanded affix "><a href="index.html">Introduction</a></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">1.</strong> Installation</a></li><li class="chapter-item expanded "><a href="build.html"><strong aria-hidden="true">2.</strong> Build from source</a></li><li class="chapter-item expanded "><a href="contributing.html"><strong aria-hidden="true">3.</strong> Contributing</a></li><li class="chapter-item expanded "><a href="test_coverage.html"><strong aria-hidden="true">4.</strong> GNU test coverage</a></li><li class="chapter-item expanded "><a href="extensions.html"><strong aria-hidden="true">5.</strong> Extensions</a></li><li class="chapter-item expanded affix "><li class="part-title">Reference</li><li class="chapter-item expanded "><a href="multicall.html"><strong aria-hidden="true">6.</strong> Multi-call binary</a></li><li class="chapter-item expanded "><a href="utils/arch.html"><strong aria-hidden="true">7.</strong> arch</a></li><li class="chapter-item expanded "><a href="utils/b2sum.html"><strong aria-hidden="true">8.</strong> b2sum</a></li><li class="chapter-item expanded "><a href="utils/b3sum.html"><strong aria-hidden="true">9.</strong> b3sum</a></li><li class="chapter-item expanded "><a href="utils/base32.html"><strong aria-hidden="true">10.</strong> base32</a></li><li class="chapter-item expanded "><a href="utils/base64.html"><strong aria-hidden="true">11.</strong> base64</a></li><li class="chapter-item expanded "><a href="utils/basename.html"><strong aria-hidden="true">12.</strong> basename</a></li><li class="chapter-item expanded "><a href="utils/basenc.html"><strong aria-hidden="true">13.</strong> basenc</a></li><li class="chapter-item expanded "><a href="utils/cat.html"><strong aria-hidden="true">14.</strong> cat</a></li><li class="chapter-item expanded "><a href="utils/chcon.html"><strong aria-hidden="true">15.</strong> chcon</a></li><li class="chapter-item expanded "><a href="utils/chgrp.html"><strong aria-hidden="true">16.</strong> chgrp</a></li><li class="chapter-item expanded "><a href="utils/chmod.html"><strong aria-hidden="true">17.</strong> chmod</a></li><li class="chapter-item expanded "><a href="utils/chown.html"><strong aria-hidden="true">18.</strong> chown</a></li><li class="chapter-item expanded "><a href="utils/chroot.html"><strong aria-hidden="true">19.</strong> chroot</a></li><li class="chapter-item expanded "><a href="utils/cksum.html"><strong aria-hidden="true">20.</strong> cksum</a></li><li class="chapter-item expanded "><a href="utils/comm.html"><strong aria-hidden="true">21.</strong> comm</a></li><li class="chapter-item expanded "><a href="utils/cp.html"><strong aria-hidden="true">22.</strong> cp</a></li><li class="chapter-item expanded "><a href="utils/csplit.html"><strong aria-hidden="true">23.</strong> csplit</a></li><li class="chapter-item expanded "><a href="utils/cut.html"><strong aria-hidden="true">24.</strong> cut</a></li><li class="chapter-item expanded "><a href="utils/date.html"><strong aria-hidden="true">25.</strong> date</a></li><li class="chapter-item expanded "><a href="utils/dd.html"><strong aria-hidden="true">26.</strong> dd</a></li><li class="chapter-item expanded "><a href="utils/df.html"><strong aria-hidden="true">27.</strong> df</a></li><li class="chapter-item expanded "><a href="utils/dir.html"><strong aria-hidden="true">28.</strong> dir</a></li><li class="chapter-item expanded "><a href="utils/dircolors.html"><strong aria-hidden="true">29.</strong> dircolors</a></li><li class="chapter-item expanded "><a href="utils/dirname.html"><strong aria-hidden="true">30.</strong> dirname</a></li><li class="chapter-item expanded "><a href="utils/du.html"><strong aria-hidden="true">31.</strong> du</a></li><li class="chapter-item expanded "><a href="utils/echo.html"><strong aria-hidden="true">32.</strong> echo</a></li><li class="chapter-item expanded "><a href="utils/env.html"><strong aria-hidden="true">33.</strong> env</a></li><li class="chapter-item expanded "><a href="utils/expand.html"><strong aria-hidden="true">34.</strong> expand</a></li><li class="chapter-item expanded "><a href="utils/expr.html"><strong aria-hidden="true">35.</strong> expr</a></li><li class="chapter-item expanded "><a href="utils/factor.html"><strong aria-hidden="true">36.</strong> factor</a></li><li class="chapter-item expanded "><a href="utils/false.html"><strong aria-hidden="true">37.</strong> false</a></li><li class="chapter-item expanded "><a href="utils/fmt.html"><strong aria-hidden="true">38.</strong> fmt</a></li><li class="chapter-item expanded "><a href="utils/fold.html"><strong aria-hidden="true">39.</strong> fold</a></li><li class="chapter-item expanded "><a href="utils/groups.html"><strong aria-hidden="true">40.</strong> groups</a></li><li class="chapter-item expanded "><a href="utils/hashsum.html"><strong aria-hidden="true">41.</strong> hashsum</a></li><li class="chapter-item expanded "><a href="utils/head.html"><strong aria-hidden="true">42.</strong> head</a></li><li class="chapter-item expanded "><a href="utils/hostid.html"><strong aria-hidden="true">43.</strong> hostid</a></li><li class="chapter-item expanded "><a href="utils/hostname.html"><strong aria-hidden="true">44.</strong> hostname</a></li><li class="chapter-item expanded "><a href="utils/id.html"><strong aria-hidden="true">45.</strong> id</a></li><li class="chapter-item expanded "><a href="utils/install.html"><strong aria-hidden="true">46.</strong> install</a></li><li class="chapter-item expanded "><a href="utils/join.html"><strong aria-hidden="true">47.</strong> join</a></li><li class="chapter-item expanded "><a href="utils/kill.html"><strong aria-hidden="true">48.</strong> kill</a></li><li class="chapter-item expanded "><a href="utils/link.html"><strong aria-hidden="true">49.</strong> link</a></li><li class="chapter-item expanded "><a href="utils/ln.html"><strong aria-hidden="true">50.</strong> ln</a></li><li class="chapter-item expanded "><a href="utils/logname.html"><strong aria-hidden="true">51.</strong> logname</a></li><li class="chapter-item expanded "><a href="utils/ls.html"><strong aria-hidden="true">52.</strong> ls</a></li><li class="chapter-item expanded "><a href="utils/md5sum.html"><strong aria-hidden="true">53.</strong> md5sum</a></li><li class="chapter-item expanded "><a href="utils/mkdir.html"><strong aria-hidden="true">54.</strong> mkdir</a></li><li class="chapter-item expanded "><a href="utils/mkfifo.html"><strong aria-hidden="true">55.</strong> mkfifo</a></li><li class="chapter-item expanded "><a href="utils/mknod.html"><strong aria-hidden="true">56.</strong> mknod</a></li><li class="chapter-item expanded "><a href="utils/mktemp.html"><strong aria-hidden="true">57.</strong> mktemp</a></li><li class="chapter-item expanded "><a href="utils/more.html"><strong aria-hidden="true">58.</strong> more</a></li><li class="chapter-item expanded "><a href="utils/mv.html"><strong aria-hidden="true">59.</strong> mv</a></li><li class="chapter-item expanded "><a href="utils/nice.html"><strong aria-hidden="true">60.</strong> nice</a></li><li class="chapter-item expanded "><a href="utils/nl.html"><strong aria-hidden="true">61.</strong> nl</a></li><li class="chapter-item expanded "><a href="utils/nohup.html"><strong aria-hidden="true">62.</strong> nohup</a></li><li class="chapter-item expanded "><a href="utils/nproc.html"><strong aria-hidden="true">63.</strong> nproc</a></li><li class="chapter-item expanded "><a href="utils/numfmt.html"><strong aria-hidden="true">64.</strong> numfmt</a></li><li class="chapter-item expanded "><a href="utils/od.html"><strong aria-hidden="true">65.</strong> od</a></li><li class="chapter-item expanded "><a href="utils/paste.html"><strong aria-hidden="true">66.</strong> paste</a></li><li class="chapter-item expanded "><a href="utils/pathchk.html"><strong aria-hidden="true">67.</strong> pathchk</a></li><li class="chapter-item expanded "><a href="utils/pinky.html"><strong aria-hidden="true">68.</strong> pinky</a></li><li class="chapter-item expanded "><a href="utils/pr.html"><strong aria-hidden="true">69.</strong> pr</a></li><li class="chapter-item expanded "><a href="utils/printenv.html"><strong aria-hidden="true">70.</strong> printenv</a></li><li class="chapter-item expanded "><a href="utils/printf.html"><strong aria-hidden="true">71.</strong> printf</a></li><li class="chapter-item expanded "><a href="utils/ptx.html"><strong aria-hidden="true">72.</strong> ptx</a></li><li class="chapter-item expanded "><a href="utils/pwd.html"><strong aria-hidden="true">73.</strong> pwd</a></li><li class="chapter-item expanded "><a href="utils/readlink.html"><strong aria-hidden="true">74.</strong> readlink</a></li><li class="chapter-item expanded "><a href="utils/realpath.html"><strong aria-hidden="true">75.</strong> realpath</a></li><li class="chapter-item expanded "><a href="utils/relpath.html"><strong aria-hidden="true">76.</strong> relpath</a></li><li class="chapter-item expanded "><a href="utils/rm.html"><strong aria-hidden="true">77.</strong> rm</a></li><li class="chapter-item expanded "><a href="utils/rmdir.html"><strong aria-hidden="true">78.</strong> rmdir</a></li><li class="chapter-item expanded "><a href="utils/runcon.html"><strong aria-hidden="true">79.</strong> runcon</a></li><li class="chapter-item expanded "><a href="utils/seq.html"><strong aria-hidden="true">80.</strong> seq</a></li><li class="chapter-item expanded "><a href="utils/sha1sum.html"><strong aria-hidden="true">81.</strong> sha1sum</a></li><li class="chapter-item expanded "><a href="utils/sha224sum.html"><strong aria-hidden="true">82.</strong> sha224sum</a></li><li class="chapter-item expanded "><a href="utils/sha256sum.html"><strong aria-hidden="true">83.</strong> sha256sum</a></li><li class="chapter-item expanded "><a href="utils/sha3-224sum.html"><strong aria-hidden="true">84.</strong> sha3-224sum</a></li><li class="chapter-item expanded "><a href="utils/sha3-256sum.html"><strong aria-hidden="true">85.</strong> sha3-256sum</a></li><li class="chapter-item expanded "><a href="utils/sha3-384sum.html"><strong aria-hidden="true">86.</strong> sha3-384sum</a></li><li class="chapter-item expanded "><a href="utils/sha3-512sum.html"><strong aria-hidden="true">87.</strong> sha3-512sum</a></li><li class="chapter-item expanded "><a href="utils/sha384sum.html"><strong aria-hidden="true">88.</strong> sha384sum</a></li><li class="chapter-item expanded "><a href="utils/sha3sum.html"><strong aria-hidden="true">89.</strong> sha3sum</a></li><li class="chapter-item expanded "><a href="utils/sha512sum.html"><strong aria-hidden="true">90.</strong> sha512sum</a></li><li class="chapter-item expanded "><a href="utils/shake128sum.html"><strong aria-hidden="true">91.</strong> shake128sum</a></li><li class="chapter-item expanded "><a href="utils/shake256sum.html"><strong aria-hidden="true">92.</strong> shake256sum</a></li><li class="chapter-item expanded "><a href="utils/shred.html"><strong aria-hidden="true">93.</strong> shred</a></li><li class="chapter-item expanded "><a href="utils/shuf.html"><strong aria-hidden="true">94.</strong> shuf</a></li><li class="chapter-item expanded "><a href="utils/sleep.html"><strong aria-hidden="true">95.</strong> sleep</a></li><li class="chapter-item expanded "><a href="utils/sort.html"><strong aria-hidden="true">96.</strong> sort</a></li><li class="chapter-item expanded "><a href="utils/split.html"><strong aria-hidden="true">97.</strong> split</a></li><li class="chapter-item expanded "><a href="utils/stat.html"><strong aria-hidden="true">98.</strong> stat</a></li><li class="chapter-item expanded "><a href="utils/stdbuf.html"><strong aria-hidden="true">99.</strong> stdbuf</a></li><li class="chapter-item expanded "><a href="utils/stty.html"><strong aria-hidden="true">100.</strong> stty</a></li><li class="chapter-item expanded "><a href="utils/sum.html"><strong aria-hidden="true">101.</strong> sum</a></li><li class="chapter-item expanded "><a href="utils/sync.html"><strong aria-hidden="true">102.</strong> sync</a></li><li class="chapter-item expanded "><a href="utils/tac.html"><strong aria-hidden="true">103.</strong> tac</a></li><li class="chapter-item expanded "><a href="utils/tail.html"><strong aria-hidden="true">104.</strong> tail</a></li><li class="chapter-item expanded "><a href="utils/tee.html"><strong aria-hidden="true">105.</strong> tee</a></li><li class="chapter-item expanded "><a href="utils/test.html"><strong aria-hidden="true">106.</strong> test</a></li><li class="chapter-item expanded "><a href="utils/timeout.html"><strong aria-hidden="true">107.</strong> timeout</a></li><li class="chapter-item expanded "><a href="utils/touch.html"><strong aria-hidden="true">108.</strong> touch</a></li><li class="chapter-item expanded "><a href="utils/tr.html"><strong aria-hidden="true">109.</strong> tr</a></li><li class="chapter-item expanded "><a href="utils/true.html"><strong aria-hidden="true">110.</strong> true</a></li><li class="chapter-item expanded "><a href="utils/truncate.html"><strong aria-hidden="true">111.</strong> truncate</a></li><li class="chapter-item expanded "><a href="utils/tsort.html"><strong aria-hidden="true">112.</strong> tsort</a></li><li class="chapter-item expanded "><a href="utils/tty.html"><strong aria-hidden="true">113.</strong> tty</a></li><li class="chapter-item expanded "><a href="utils/uname.html"><strong aria-hidden="true">114.</strong> uname</a></li><li class="chapter-item expanded "><a href="utils/unexpand.html"><strong aria-hidden="true">115.</strong> unexpand</a></li><li class="chapter-item expanded "><a href="utils/uniq.html"><strong aria-hidden="true">116.</strong> uniq</a></li><li class="chapter-item expanded "><a href="utils/unlink.html"><strong aria-hidden="true">117.</strong> unlink</a></li><li class="chapter-item expanded "><a href="utils/uptime.html"><strong aria-hidden="true">118.</strong> uptime</a></li><li class="chapter-item expanded "><a href="utils/users.html"><strong aria-hidden="true">119.</strong> users</a></li><li class="chapter-item expanded "><a href="utils/vdir.html"><strong aria-hidden="true">120.</strong> vdir</a></li><li class="chapter-item expanded "><a href="utils/wc.html"><strong aria-hidden="true">121.</strong> wc</a></li><li class="chapter-item expanded "><a href="utils/who.html"><strong aria-hidden="true">122.</strong> who</a></li><li class="chapter-item expanded "><a href="utils/whoami.html"><strong aria-hidden="true">123.</strong> whoami</a></li><li class="chapter-item expanded "><a href="utils/yes.html"><strong aria-hidden="true">124.</strong> yes</a></li></ol>
|
||
</div>
|
||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||
</nav>
|
||
|
||
<div id="page-wrapper" class="page-wrapper">
|
||
|
||
<div class="page">
|
||
<div id="menu-bar-hover-placeholder"></div>
|
||
<div id="menu-bar" class="menu-bar sticky bordered">
|
||
<div class="left-buttons">
|
||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||
<i class="fa fa-bars"></i>
|
||
</button>
|
||
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||
<i class="fa fa-paint-brush"></i>
|
||
</button>
|
||
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||
</ul>
|
||
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||
<i class="fa fa-search"></i>
|
||
</button>
|
||
</div>
|
||
|
||
<h1 class="menu-title">uutils Documentation</h1>
|
||
|
||
<div class="right-buttons">
|
||
<a href="print.html" title="Print this book" aria-label="Print this book">
|
||
<i id="print-button" class="fa fa-print"></i>
|
||
</a>
|
||
<a href="https://github.com/rust-lang/cargo/tree/master/src/doc/src" title="Git repository" aria-label="Git repository">
|
||
<i id="git-repository-button" class="fa fa-github"></i>
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="search-wrapper" class="hidden">
|
||
<form id="searchbar-outer" class="searchbar-outer">
|
||
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
||
</form>
|
||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
||
<div id="searchresults-header" class="searchresults-header"></div>
|
||
<ul id="searchresults">
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||
<script>
|
||
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||
});
|
||
</script>
|
||
|
||
<div id="content" class="content">
|
||
<main>
|
||
<!-- markdownlint-disable MD041 -->
|
||
<p><svg height="106" width="106" viewbox="0 0 106 106" id="logo"
|
||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
xmlns:svg="http://www.w3.org/2000/svg">
|
||
<g id="logo" transform="translate(53, 53)">
|
||
<g id="gear" mask="url(#holes)">
|
||
<circle r="43" fill="none" stroke="black" stroke-width="9" />
|
||
<g id="cogs">
|
||
<polygon id="cog" stroke="black" stroke-width="3" stroke-linejoin="round" points="46,3 51,0 46,-3" />
|
||
<use xlink:href="#cog" transform="rotate(11.25)" />
|
||
<use xlink:href="#cog" transform="rotate(22.50)" />
|
||
<use xlink:href="#cog" transform="rotate(33.75)" />
|
||
<use xlink:href="#cog" transform="rotate(45.00)" />
|
||
<use xlink:href="#cog" transform="rotate(56.25)" />
|
||
<use xlink:href="#cog" transform="rotate(67.50)" />
|
||
<use xlink:href="#cog" transform="rotate(78.75)" />
|
||
<use xlink:href="#cog" transform="rotate(90.00)" />
|
||
<use xlink:href="#cog" transform="rotate(101.25)" />
|
||
<use xlink:href="#cog" transform="rotate(112.50)" />
|
||
<use xlink:href="#cog" transform="rotate(123.75)" />
|
||
<use xlink:href="#cog" transform="rotate(135.00)" />
|
||
<use xlink:href="#cog" transform="rotate(146.25)" />
|
||
<use xlink:href="#cog" transform="rotate(157.50)" />
|
||
<use xlink:href="#cog" transform="rotate(168.75)" />
|
||
<use xlink:href="#cog" transform="rotate(180.00)" />
|
||
<use xlink:href="#cog" transform="rotate(191.25)" />
|
||
<use xlink:href="#cog" transform="rotate(202.50)" />
|
||
<use xlink:href="#cog" transform="rotate(213.75)" />
|
||
<use xlink:href="#cog" transform="rotate(225.00)" />
|
||
<use xlink:href="#cog" transform="rotate(236.25)" />
|
||
<use xlink:href="#cog" transform="rotate(247.50)" />
|
||
<use xlink:href="#cog" transform="rotate(258.75)" />
|
||
<use xlink:href="#cog" transform="rotate(270.00)" />
|
||
<use xlink:href="#cog" transform="rotate(281.25)" />
|
||
<use xlink:href="#cog" transform="rotate(292.50)" />
|
||
<use xlink:href="#cog" transform="rotate(303.75)" />
|
||
<use xlink:href="#cog" transform="rotate(315.00)" />
|
||
<use xlink:href="#cog" transform="rotate(326.25)" />
|
||
<use xlink:href="#cog" transform="rotate(337.50)" />
|
||
<use xlink:href="#cog" transform="rotate(348.75)" />
|
||
</g>
|
||
<g id="mounts">
|
||
<polygon id="mount" stroke="black" stroke-width="6" stroke-linejoin="round" points="-7,-42 0,-35 7,-42" />
|
||
<use xlink:href="#mount" transform="rotate(72)" />
|
||
<use xlink:href="#mount" transform="rotate(144)" />
|
||
<use xlink:href="#mount" transform="rotate(216)" />
|
||
<use xlink:href="#mount" transform="rotate(288)" />
|
||
</g>
|
||
</g>
|
||
<mask id="holes">
|
||
<rect x="-60" y="-60" width="120" height="120" fill="white" />
|
||
<circle id="hole" cy="-40" r="3" />
|
||
<use xlink:href="#hole" transform="rotate(72)" />
|
||
<use xlink:href="#hole" transform="rotate(144)" />
|
||
<use xlink:href="#hole" transform="rotate(216)" />
|
||
<use xlink:href="#hole" transform="rotate(288)" />
|
||
</mask>
|
||
</g>
|
||
<path aria-label="U" transform="matrix(1.1188958,0,0,1.3531467,106.90401,-3.0479991)" style="fill:#c04828"
|
||
d="m -30.914582,47.152116 c 0,-6.410851 0,-27.142255 0,-27.142255 h -9.981735 c 0,0 0,22.706465 0,27.142255 0,4.43579 -0.989404,8.475308 -7.250584,8.492265 -6.26118,0.01696 -7.308935,-4.147055 -7.308935,-8.492265 V 20.009861 h -9.981735 v 27.142255 c 0,6.425292 2.643496,15.679002 17.261495,15.679002 14.617999,0 17.261494,-9.268151 17.261494,-15.679002 z" />
|
||
</svg></p>
|
||
<!-- markdownlint-disable MD033 -->
|
||
<style>
|
||
/* Make the logo a bit bigger and center */
|
||
#logo {
|
||
height: 200px;
|
||
width: 100%;
|
||
}
|
||
|
||
/* This is necessary to get the <use> tags to obey the CSS styles below */
|
||
g, polygon {
|
||
fill: inherit;
|
||
stroke: inherit;
|
||
}
|
||
|
||
/* Set the circle to the foreground color of the theme */
|
||
#gear circle {
|
||
stroke: var(--fg);
|
||
}
|
||
|
||
/* Set the stroke of polygons and the copies (via use) */
|
||
#gear polygon,
|
||
#gear use {
|
||
fill: var(--fg);
|
||
stroke: var(--fg);
|
||
}
|
||
</style>
|
||
<h1 id="uutils-coreutils-documentation"><a class="header" href="#uutils-coreutils-documentation">uutils Coreutils Documentation</a></h1>
|
||
<p>uutils is an attempt at writing universal (as in cross-platform) CLI utilities
|
||
in <a href="https://www.rust-lang.org">Rust</a>. It is available for Linux, Windows, Mac
|
||
and other platforms.</p>
|
||
<p>The API reference for <code>uucore</code>, the library of functions shared between various
|
||
utils, is hosted at <a href="https://docs.rs/uucore/latest/uucore/">docs.rs</a>.</p>
|
||
<p>uutils is licensed under the
|
||
<a href="https://github.com/uutils/coreutils/blob/main/LICENSE">MIT License</a>.</p>
|
||
<h2 id="useful-links"><a class="header" href="#useful-links">Useful links</a></h2>
|
||
<ul>
|
||
<li><a href="https://github.com/uutils/coreutils/releases">Releases</a></li>
|
||
<li><a href="https://github.com/uutils/coreutils">Source Code</a></li>
|
||
<li><a href="https://github.com/uutils/coreutils/issues">Issues</a></li>
|
||
<li><a href="https://discord.gg/wQVJbvJ">Discord</a></li>
|
||
</ul>
|
||
<blockquote>
|
||
<p>Note: This manual is automatically generated from the source code and is a
|
||
work in progress.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><!-- spell-checker:ignore pacman pamac nixpkgs openmandriva -->
|
||
<h1 id="installation"><a class="header" href="#installation">Installation</a></h1>
|
||
<p>This is a list of uutils packages in various distributions and package managers.
|
||
Note that these are packaged by third-parties and the packages might contain
|
||
patches.</p>
|
||
<p>You can also <a href="/build.html">build uutils from source</a>.</p>
|
||
<ul>
|
||
<li><a href="installation.html#cargo">Cargo</a></li>
|
||
<li><a href="installation.html#linux">Linux</a>
|
||
<ul>
|
||
<li><a href="installation.html#alpine">Alpine</a></li>
|
||
<li><a href="installation.html#arch">Arch</a></li>
|
||
<li><a href="installation.html#debian">Debian</a></li>
|
||
<li><a href="installation.html#gentoo">Gentoo</a></li>
|
||
<li><a href="installation.html#manjaro">Manjaro</a></li>
|
||
<li><a href="installation.html#nixos">NixOS</a></li>
|
||
<li><a href="installation.html#openmandriva-lx">OpenMandriva Lx</a></li>
|
||
<li><a href="installation.html#ubuntu">Ubuntu</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="installation.html#macos">MacOS</a>
|
||
<ul>
|
||
<li><a href="installation.html#homebrew">Homebrew</a></li>
|
||
<li><a href="installation.html#macports">MacPorts</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="installation.html#freebsd">FreeBSD</a></li>
|
||
<li><a href="installation.html#windows">Windows</a>
|
||
<ul>
|
||
<li><a href="installation.html#scoop">Scoop</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="installation.html#non-standard-packages">Non-standard packages</a>
|
||
<ul>
|
||
<li><a href="installation.html#coreutils-hybrid-aur"><code>coreutils-hybrid</code> (AUR)</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<h2 id="cargo"><a class="header" href="#cargo">Cargo</a></h2>
|
||
<p><a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/crates_io/uutils-coreutils.svg" alt="crates.io package" /></a></p>
|
||
<pre><code class="language-shell"># Linux
|
||
cargo install coreutils --features unix
|
||
# MacOs
|
||
cargo install coreutils --features macos
|
||
# Windows
|
||
cargo install coreutils --features windows
|
||
</code></pre>
|
||
<h2 id="linux"><a class="header" href="#linux">Linux</a></h2>
|
||
<h3 id="alpine"><a class="header" href="#alpine">Alpine</a></h3>
|
||
<p><a href="https://pkgs.alpinelinux.org/packages?name=uutils-coreutils"><img src="https://repology.org/badge/version-for-repo/alpine_edge/uutils-coreutils.svg" alt="Alpine Linux Edge package" /></a></p>
|
||
<pre><code class="language-shell">apk update uutils-coreutils
|
||
</code></pre>
|
||
<blockquote>
|
||
<p><strong>Note</strong>: Requires the <code>edge</code> repository.</p>
|
||
</blockquote>
|
||
<h3 id="arch"><a class="header" href="#arch">Arch</a></h3>
|
||
<p><a href="https://archlinux.org/packages/community/x86_64/uutils-coreutils/"><img src="https://repology.org/badge/version-for-repo/arch/uutils-coreutils.svg" alt="Arch package" /></a></p>
|
||
<pre><code class="language-shell">pacman -S uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="debian"><a class="header" href="#debian">Debian</a></h3>
|
||
<p><a href="https://packages.debian.org/sid/source/rust-coreutils"><img src="https://repology.org/badge/version-for-repo/debian_unstable/uutils-coreutils.svg" alt="Debian package" /></a></p>
|
||
<pre><code class="language-shell">apt install rust-coreutils
|
||
# To use it:
|
||
export PATH=/usr/lib/cargo/bin/coreutils:$PATH
|
||
</code></pre>
|
||
<blockquote>
|
||
<p><strong>Note</strong>: Only available from Bookworm (Debian 12)</p>
|
||
</blockquote>
|
||
<h3 id="gentoo"><a class="header" href="#gentoo">Gentoo</a></h3>
|
||
<p><a href="https://packages.gentoo.org/packages/sys-apps/uutils-coreutils"><img src="https://repology.org/badge/version-for-repo/gentoo/uutils-coreutils.svg" alt="Gentoo package" /></a></p>
|
||
<pre><code class="language-shell">emerge -pv sys-apps/uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="manjaro"><a class="header" href="#manjaro">Manjaro</a></h3>
|
||
<p><img src="https://repology.org/badge/version-for-repo/manjaro_stable/uutils-coreutils.svg" alt="Manjaro Stable package" />
|
||
<a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/manjaro_testing/uutils-coreutils.svg" alt="Manjaro Testing package" /></a>
|
||
<a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/manjaro_unstable/uutils-coreutils.svg" alt="Manjaro Unstable package" /></a></p>
|
||
<pre><code class="language-shell">pacman -S uutils-coreutils
|
||
# or
|
||
pamac install uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="nixos"><a class="header" href="#nixos">NixOS</a></h3>
|
||
<p><a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/nix_unstable/uutils-coreutils.svg" alt="nixpkgs unstable package" /></a></p>
|
||
<pre><code class="language-shell">nix-env -iA nixos.uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="openmandriva-lx"><a class="header" href="#openmandriva-lx">OpenMandriva Lx</a></h3>
|
||
<p><a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/openmandriva_cooker/uutils-coreutils.svg" alt="openmandriva cooker package" /></a></p>
|
||
<pre><code class="language-shell">dnf install uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="ubuntu"><a class="header" href="#ubuntu">Ubuntu</a></h3>
|
||
<p><a href="https://packages.ubuntu.com/source/lunar/rust-coreutils"><img src="https://repology.org/badge/version-for-repo/ubuntu_23_04/uutils-coreutils.svg" alt="Ubuntu package" /></a></p>
|
||
<pre><code class="language-shell">apt install rust-coreutils
|
||
# To use it:
|
||
export PATH=/usr/lib/cargo/bin/coreutils:$PATH
|
||
</code></pre>
|
||
<blockquote>
|
||
<p><strong>Note</strong>: Only available from Kinetic (Ubuntu 22.10)</p>
|
||
</blockquote>
|
||
<h2 id="macos"><a class="header" href="#macos">MacOS</a></h2>
|
||
<h3 id="homebrew"><a class="header" href="#homebrew">Homebrew</a></h3>
|
||
<p><a href="https://formulae.brew.sh/formula/uutils-coreutils"><img src="https://repology.org/badge/version-for-repo/homebrew/uutils-coreutils.svg" alt="Homebrew package" /></a></p>
|
||
<pre><code class="language-shell">brew install uutils-coreutils
|
||
</code></pre>
|
||
<h3 id="macports"><a class="header" href="#macports">MacPorts</a></h3>
|
||
<p><a href="https://ports.macports.org/port/coreutils-uutils/"><img src="https://repology.org/badge/version-for-repo/macports/uutils-coreutils.svg" alt="MacPorts package" /></a></p>
|
||
<pre><code>port install coreutils-uutils
|
||
</code></pre>
|
||
<h2 id="freebsd"><a class="header" href="#freebsd">FreeBSD</a></h2>
|
||
<p><a href="https://repology.org/project/uutils-coreutils/versions"><img src="https://repology.org/badge/version-for-repo/freebsd/uutils-coreutils.svg" alt="FreeBSD port" /></a></p>
|
||
<pre><code class="language-sh">pkg install rust-coreutils
|
||
</code></pre>
|
||
<h2 id="windows"><a class="header" href="#windows">Windows</a></h2>
|
||
<h3 id="scoop"><a class="header" href="#scoop">Scoop</a></h3>
|
||
<p><a href="https://scoop.sh/#/apps?q=uutils-coreutils&s=0&d=1&o=true"><img src="https://repology.org/badge/version-for-repo/scoop/uutils-coreutils.svg" alt="Scoop package" /></a></p>
|
||
<pre><code class="language-shell">scoop install uutils-coreutils
|
||
</code></pre>
|
||
<h2 id="non-standard-packages"><a class="header" href="#non-standard-packages">Non-standard packages</a></h2>
|
||
<h3 id="coreutils-hybrid-aur"><a class="header" href="#coreutils-hybrid-aur"><code>coreutils-hybrid</code> (AUR)</a></h3>
|
||
<p><a href="https://aur.archlinux.org/packages/coreutils-hybrid"><img src="https://repology.org/badge/version-for-repo/aur/coreutils-hybrid.svg" alt="AUR package" /></a></p>
|
||
<p>A GNU coreutils / uutils coreutils hybrid package. Uses stable uutils
|
||
programs mixed with GNU counterparts if uutils counterpart is
|
||
unfinished or buggy.</p>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="build-from-source"><a class="header" href="#build-from-source">Build from source</a></h1>
|
||
<h2 id="requirements"><a class="header" href="#requirements">Requirements</a></h2>
|
||
<ul>
|
||
<li>Rust (<code>cargo</code>, <code>rustc</code>)</li>
|
||
<li>GNU Make (optional)</li>
|
||
</ul>
|
||
<h3 id="rust-version"><a class="header" href="#rust-version">Rust Version</a></h3>
|
||
<p>uutils follows Rust's release channels and is tested against stable, beta and
|
||
nightly. The current Minimum Supported Rust Version (MSRV) is <code>1.64.0</code>.</p>
|
||
<h2 id="building"><a class="header" href="#building">Building</a></h2>
|
||
<p>There are currently two methods to build the uutils binaries: either Cargo or
|
||
GNU Make.</p>
|
||
<blockquote>
|
||
<p>Building the full package, including all documentation, requires both Cargo
|
||
and Gnu Make on a Unix platform.</p>
|
||
</blockquote>
|
||
<p>For either method, we first need to fetch the repository:</p>
|
||
<pre><code class="language-shell">git clone https://github.com/uutils/coreutils
|
||
cd coreutils
|
||
</code></pre>
|
||
<h3 id="cargo-1"><a class="header" href="#cargo-1">Cargo</a></h3>
|
||
<p>Building uutils using Cargo is easy because the process is the same as for every
|
||
other Rust program:</p>
|
||
<pre><code class="language-shell">cargo build --release
|
||
</code></pre>
|
||
<p>This command builds the most portable common core set of uutils into a multicall
|
||
(BusyBox-type) binary, named 'coreutils', on most Rust-supported platforms.</p>
|
||
<p>Additional platform-specific uutils are often available. Building these expanded
|
||
sets of uutils for a platform (on that platform) is as simple as specifying it
|
||
as a feature:</p>
|
||
<pre><code class="language-shell">cargo build --release --features macos
|
||
# or ...
|
||
cargo build --release --features windows
|
||
# or ...
|
||
cargo build --release --features unix
|
||
</code></pre>
|
||
<p>If you don't want to build every utility available on your platform into the
|
||
final binary, you can also specify which ones you want to build manually. For
|
||
example:</p>
|
||
<pre><code class="language-shell">cargo build --features "base32 cat echo rm" --no-default-features
|
||
</code></pre>
|
||
<p>If you don't want to build the multicall binary and would prefer to build the
|
||
utilities as individual binaries, that is also possible. Each utility is
|
||
contained in its own package within the main repository, named "uu_UTILNAME". To
|
||
build individual utilities, use cargo to build just the specific packages (using
|
||
the <code>--package</code> [aka <code>-p</code>] option). For example:</p>
|
||
<pre><code class="language-shell">cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm
|
||
</code></pre>
|
||
<h3 id="gnu-make"><a class="header" href="#gnu-make">GNU Make</a></h3>
|
||
<p>Building using <code>make</code> is a simple process as well.</p>
|
||
<p>To simply build all available utilities:</p>
|
||
<pre><code class="language-shell">make
|
||
</code></pre>
|
||
<p>In release mode:</p>
|
||
<pre><code class="language-shell">make PROFILE=release
|
||
</code></pre>
|
||
<p>To build all but a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make SKIP_UTILS='UTILITY_1 UTILITY_2'
|
||
</code></pre>
|
||
<p>To build only a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2'
|
||
</code></pre>
|
||
<h2 id="installation-1"><a class="header" href="#installation-1">Installation</a></h2>
|
||
<h3 id="install-with-cargo"><a class="header" href="#install-with-cargo">Install with Cargo</a></h3>
|
||
<p>Likewise, installing can simply be done using:</p>
|
||
<pre><code class="language-shell">cargo install --path . --locked
|
||
</code></pre>
|
||
<p>This command will install uutils into Cargo's <em>bin</em> folder (<em>e.g.</em>
|
||
<code>$HOME/.cargo/bin</code>).</p>
|
||
<p>This does not install files necessary for shell completion or manpages. For
|
||
manpages or shell completion to work, use <code>GNU Make</code> or see
|
||
<code>Manually install shell completions</code>/<code>Manually install manpages</code>.</p>
|
||
<h3 id="install-with-gnu-make"><a class="header" href="#install-with-gnu-make">Install with GNU Make</a></h3>
|
||
<p>To install all available utilities:</p>
|
||
<pre><code class="language-shell">make install
|
||
</code></pre>
|
||
<p>To install using <code>sudo</code> switch <code>-E</code> must be used:</p>
|
||
<pre><code class="language-shell">sudo -E make install
|
||
</code></pre>
|
||
<p>To install all but a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make SKIP_UTILS='UTILITY_1 UTILITY_2' install
|
||
</code></pre>
|
||
<p>To install only a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' install
|
||
</code></pre>
|
||
<p>To install every program with a prefix (e.g. uu-echo uu-cat):</p>
|
||
<pre><code class="language-shell">make PROG_PREFIX=PREFIX_GOES_HERE install
|
||
</code></pre>
|
||
<p>To install the multicall binary:</p>
|
||
<pre><code class="language-shell">make MULTICALL=y install
|
||
</code></pre>
|
||
<p>Set install parent directory (default value is /usr/local):</p>
|
||
<pre><code class="language-shell"># DESTDIR is also supported
|
||
make PREFIX=/my/path install
|
||
</code></pre>
|
||
<p>Installing with <code>make</code> installs shell completions for all installed utilities
|
||
for <code>bash</code>, <code>fish</code> and <code>zsh</code>. Completions for <code>elvish</code> and <code>powershell</code> can also
|
||
be generated; See <code>Manually install shell completions</code>.</p>
|
||
<h3 id="manually-install-shell-completions"><a class="header" href="#manually-install-shell-completions">Manually install shell completions</a></h3>
|
||
<p>The <code>coreutils</code> binary can generate completions for the <code>bash</code>, <code>elvish</code>,
|
||
<code>fish</code>, <code>powershell</code> and <code>zsh</code> shells. It prints the result to stdout.</p>
|
||
<p>The syntax is:</p>
|
||
<pre><code class="language-shell">cargo run completion <utility> <shell>
|
||
</code></pre>
|
||
<p>So, to install completions for <code>ls</code> on <code>bash</code> to
|
||
<code>/usr/local/share/bash-completion/completions/ls</code>, run:</p>
|
||
<pre><code class="language-shell">cargo run completion ls bash > /usr/local/share/bash-completion/completions/ls
|
||
</code></pre>
|
||
<h3 id="manually-install-manpages"><a class="header" href="#manually-install-manpages">Manually install manpages</a></h3>
|
||
<p>To generate manpages, the syntax is:</p>
|
||
<pre><code class="language-bash">cargo run manpage <utility>
|
||
</code></pre>
|
||
<p>So, to install the manpage for <code>ls</code> to <code>/usr/local/share/man/man1/ls.1</code> run:</p>
|
||
<pre><code class="language-bash">cargo run manpage ls > /usr/local/share/man/man1/ls.1
|
||
</code></pre>
|
||
<h2 id="un-installation"><a class="header" href="#un-installation">Un-installation</a></h2>
|
||
<p>Un-installation differs depending on how you have installed uutils. If you used
|
||
Cargo to install, use Cargo to uninstall. If you used GNU Make to install, use
|
||
Make to uninstall.</p>
|
||
<h3 id="uninstall-with-cargo"><a class="header" href="#uninstall-with-cargo">Uninstall with Cargo</a></h3>
|
||
<p>To uninstall uutils:</p>
|
||
<pre><code class="language-shell">cargo uninstall uutils
|
||
</code></pre>
|
||
<h3 id="uninstall-with-gnu-make"><a class="header" href="#uninstall-with-gnu-make">Uninstall with GNU Make</a></h3>
|
||
<p>To uninstall all utilities:</p>
|
||
<pre><code class="language-shell">make uninstall
|
||
</code></pre>
|
||
<p>To uninstall every program with a set prefix:</p>
|
||
<pre><code class="language-shell">make PROG_PREFIX=PREFIX_GOES_HERE uninstall
|
||
</code></pre>
|
||
<p>To uninstall the multicall binary:</p>
|
||
<pre><code class="language-shell">make MULTICALL=y uninstall
|
||
</code></pre>
|
||
<p>To uninstall from a custom parent directory:</p>
|
||
<pre><code class="language-shell"># DESTDIR is also supported
|
||
make PREFIX=/my/path uninstall
|
||
</code></pre>
|
||
<div style="break-before: page; page-break-before: always;"></div><!-- markdownlint-disable MD041 -->
|
||
<!-- spell-checker:ignore reimplementing toybox RUNTEST CARGOFLAGS nextest -->
|
||
<h1 id="contributing-to-coreutils"><a class="header" href="#contributing-to-coreutils">Contributing to coreutils</a></h1>
|
||
<p>Contributions are very welcome via Pull Requests. If you don't know where to
|
||
start, take a look at the
|
||
<a href="https://github.com/uutils/coreutils/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22"><code>good-first-issues</code></a>.
|
||
If you have any questions, feel free to ask them in the issues or on
|
||
<a href="https://discord.gg/wQVJbvJ">Discord</a>.</p>
|
||
<h2 id="best-practices"><a class="header" href="#best-practices">Best practices</a></h2>
|
||
<ol>
|
||
<li>Follow what GNU is doing in terms of options and behavior. It is recommended
|
||
to look at the GNU Coreutils manual (<a href="https://www.gnu.org/software/coreutils/manual/html_node/index.html">on the
|
||
web</a>, or
|
||
locally using <code>info <utility></code>). It is more in depth than the man pages and
|
||
provides a good description of available features and their implementation
|
||
details.</li>
|
||
<li>If possible, look at the GNU test suite execution in the CI and make the test
|
||
work if failing.</li>
|
||
<li>Use clap for argument management.</li>
|
||
<li>Make sure that the code coverage is covering all of the cases, including
|
||
errors.</li>
|
||
<li>The code must be clippy-warning-free and rustfmt-compliant.</li>
|
||
<li>Don't hesitate to move common functions into uucore if they can be reused by
|
||
other binaries.</li>
|
||
<li>Unsafe code should be documented with Safety comments.</li>
|
||
<li>uutils is original code. It cannot contain code from existing GNU or Unix-like
|
||
utilities, nor should it link to or reference GNU libraries.</li>
|
||
</ol>
|
||
<h2 id="platforms"><a class="header" href="#platforms">Platforms</a></h2>
|
||
<p>We take pride in supporting many operating systems and architectures. Any code
|
||
you contribute must at least compile without warnings for all platforms in the
|
||
CI. However, you can use <code>#[cfg(...)]</code> attributes to create platform dependent features.</p>
|
||
<p><strong>Tip:</strong> For Windows, Microsoft provides some images (VMWare, Hyper-V,
|
||
VirtualBox and Parallels) for development:
|
||
<a href="https://developer.microsoft.com/windows/downloads/virtual-machines/">https://developer.microsoft.com/windows/downloads/virtual-machines/</a></p>
|
||
<h2 id="tools"><a class="header" href="#tools">Tools</a></h2>
|
||
<p>We have an extensive CI that will check your code before it can be merged. This
|
||
section explains how to run those checks locally to avoid waiting for the CI.</p>
|
||
<h3 id="pre-commit-hooks"><a class="header" href="#pre-commit-hooks">pre-commit hooks</a></h3>
|
||
<p>A configuration for <code>pre-commit</code> is provided in the repository. It allows
|
||
automatically checking every git commit you make to ensure it compiles, and
|
||
passes <code>clippy</code> and <code>rustfmt</code> without warnings.</p>
|
||
<p>To use the provided hook:</p>
|
||
<ol>
|
||
<li><a href="https://pre-commit.com/#install">Install <code>pre-commit</code></a></li>
|
||
<li>Run <code>pre-commit install</code> while in the repository directory</li>
|
||
</ol>
|
||
<p>Your git commits will then automatically be checked. If a check fails, an error
|
||
message will explain why, and your commit will be canceled. You can then make
|
||
the suggested changes, and run <code>git commit ...</code> again.</p>
|
||
<h3 id="clippy"><a class="header" href="#clippy">clippy</a></h3>
|
||
<pre><code class="language-shell">cargo clippy --all-targets --all-features
|
||
</code></pre>
|
||
<p>The <code>msrv</code> key in the clippy configuration file <code>clippy.toml</code> is used to disable
|
||
lints pertaining to newer features by specifying the minimum supported Rust
|
||
version (MSRV).</p>
|
||
<h3 id="rustfmt"><a class="header" href="#rustfmt">rustfmt</a></h3>
|
||
<pre><code class="language-shell">cargo fmt --all
|
||
</code></pre>
|
||
<h3 id="cargo-deny"><a class="header" href="#cargo-deny">cargo-deny</a></h3>
|
||
<p>This project uses <a href="https://github.com/EmbarkStudios/cargo-deny/">cargo-deny</a> to
|
||
detect duplicate dependencies, checks licenses, etc. To run it locally, first
|
||
install it and then run with:</p>
|
||
<pre><code>cargo deny --all-features check all
|
||
</code></pre>
|
||
<h3 id="markdown-linter"><a class="header" href="#markdown-linter">Markdown linter</a></h3>
|
||
<p>We use <a href="https://github.com/DavidAnson/markdownlint">markdownlint</a> to lint the
|
||
Markdown files in the repository.</p>
|
||
<h3 id="spell-checker"><a class="header" href="#spell-checker">Spell checker</a></h3>
|
||
<p>We use <code>cspell</code> as spell checker for all files in the project. If you are using
|
||
VS Code, you can install the
|
||
<a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">code spell checker</a>
|
||
extension to enable spell checking within your editor. Otherwise, you can
|
||
install <a href="https://cspell.org/">cspell</a> separately.</p>
|
||
<p>If you want to make the spell checker ignore a word, you can add</p>
|
||
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
|
||
</span><span class="boring">fn main() {
|
||
</span>// spell-checker:ignore word_to_ignore
|
||
<span class="boring">}</span></code></pre></pre>
|
||
<p>at the top of the file.</p>
|
||
<h2 id="testing"><a class="header" href="#testing">Testing</a></h2>
|
||
<p>Testing can be done using either Cargo or <code>make</code>.</p>
|
||
<h3 id="testing-with-cargo"><a class="header" href="#testing-with-cargo">Testing with Cargo</a></h3>
|
||
<p>Just like with building, we follow the standard procedure for testing using
|
||
Cargo:</p>
|
||
<pre><code class="language-shell">cargo test
|
||
</code></pre>
|
||
<p>By default, <code>cargo test</code> only runs the common programs. To run also platform
|
||
specific tests, run:</p>
|
||
<pre><code class="language-shell">cargo test --features unix
|
||
</code></pre>
|
||
<p>If you would prefer to test a select few utilities:</p>
|
||
<pre><code class="language-shell">cargo test --features "chmod mv tail" --no-default-features
|
||
</code></pre>
|
||
<p>If you also want to test the core utilities:</p>
|
||
<pre><code class="language-shell">cargo test -p uucore -p coreutils
|
||
</code></pre>
|
||
<p>Running the complete test suite might take a while. We use <a href="https://nexte.st/index.html">nextest</a> in
|
||
the CI and you might want to try it out locally. It can speed up the execution time of the whole
|
||
test run significantly if the cpu has multiple cores.</p>
|
||
<pre><code class="language-shell">cargo nextest run --features unix --no-fail-fast
|
||
</code></pre>
|
||
<p>To debug:</p>
|
||
<pre><code class="language-shell">gdb --args target/debug/coreutils ls
|
||
(gdb) b ls.rs:79
|
||
(gdb) run
|
||
</code></pre>
|
||
<h3 id="testing-with-gnu-make"><a class="header" href="#testing-with-gnu-make">Testing with GNU Make</a></h3>
|
||
<p>To simply test all available utilities:</p>
|
||
<pre><code class="language-shell">make test
|
||
</code></pre>
|
||
<p>To test all but a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make SKIP_UTILS='UTILITY_1 UTILITY_2' test
|
||
</code></pre>
|
||
<p>To test only a few of the available utilities:</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' test
|
||
</code></pre>
|
||
<p>To include tests for unimplemented behavior:</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
|
||
</code></pre>
|
||
<p>To run tests with <code>nextest</code> just use the nextest target. Note you'll need to
|
||
<a href="https://nexte.st/book/installation.html">install</a> <code>nextest</code> first. The <code>nextest</code> target accepts the
|
||
same arguments like the default <code>test</code> target, so it's possible to pass arguments to <code>nextest run</code>
|
||
via <code>CARGOFLAGS</code>:</p>
|
||
<pre><code class="language-shell">make CARGOFLAGS='--no-fail-fast' UTILS='UTILITY_1 UTILITY_2' nextest
|
||
</code></pre>
|
||
<h3 id="run-busybox-tests"><a class="header" href="#run-busybox-tests">Run Busybox Tests</a></h3>
|
||
<p>This testing functionality is only available on *nix operating systems and
|
||
requires <code>make</code>.</p>
|
||
<p>To run busybox tests for all utilities for which busybox has tests</p>
|
||
<pre><code class="language-shell">make busytest
|
||
</code></pre>
|
||
<p>To run busybox tests for a few of the available utilities</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' busytest
|
||
</code></pre>
|
||
<p>To pass an argument like "-v" to the busybox test runtime</p>
|
||
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' RUNTEST_ARGS='-v' busytest
|
||
</code></pre>
|
||
<h3 id="comparing-with-gnu"><a class="header" href="#comparing-with-gnu">Comparing with GNU</a></h3>
|
||
<p>To run uutils against the GNU test suite locally, run the following commands:</p>
|
||
<pre><code class="language-shell">bash util/build-gnu.sh
|
||
# Build uutils without release optimizations
|
||
UU_MAKE_PROFILE=debug bash util/build-gnu.sh
|
||
bash util/run-gnu-test.sh
|
||
# To run a single test:
|
||
bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example
|
||
# To run several tests:
|
||
bash util/run-gnu-test.sh tests/touch/not-owner.sh tests/rm/no-give-up.sh # for example
|
||
# If this is a perl (.pl) test, to run in debug:
|
||
DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl
|
||
</code></pre>
|
||
<p>Note that it relies on individual utilities (not the multicall binary).</p>
|
||
<h3 id="improving-the-gnu-compatibility"><a class="header" href="#improving-the-gnu-compatibility">Improving the GNU compatibility</a></h3>
|
||
<p>The Python script <code>./util/remaining-gnu-error.py</code> shows the list of failing
|
||
tests in the CI.</p>
|
||
<p>To improve the GNU compatibility, the following process is recommended:</p>
|
||
<ol>
|
||
<li>Identify a test (the smaller, the better) on a program that you understand or
|
||
is easy to understand. You can use the <code>./util/remaining-gnu-error.py</code> script
|
||
to help with this decision.</li>
|
||
<li>Build both the GNU and Rust coreutils using: <code>bash util/build-gnu.sh</code></li>
|
||
<li>Run the test with <code>bash util/run-gnu-test.sh <your test></code></li>
|
||
<li>Start to modify <code><your test></code> to understand what is wrong. Examples:
|
||
<ol>
|
||
<li>Add <code>set -v</code> to have the bash verbose mode</li>
|
||
<li>Add <code>echo $?</code> where needed</li>
|
||
<li>When the variable <code>fail</code> is used in the test, <code>echo $fail</code> to see when the
|
||
test started to fail</li>
|
||
<li>Bump the content of the output (ex: <code>cat err</code>)</li>
|
||
<li>...</li>
|
||
</ol>
|
||
</li>
|
||
<li>Or, if the test is simple, extract the relevant information to create a new
|
||
test case running both GNU & Rust implementation</li>
|
||
<li>Start to modify the Rust implementation to match the expected behavior</li>
|
||
<li>Add a test to make sure that we don't regress (our test suite is super quick)</li>
|
||
</ol>
|
||
<h2 id="commit-messages"><a class="header" href="#commit-messages">Commit messages</a></h2>
|
||
<p>To help the project maintainers review pull requests from contributors across
|
||
numerous utilities, the team has settled on conventions for commit messages.</p>
|
||
<p>From <a href="https://git-scm.com/book/ch5-2.html">https://git-scm.com/book/ch5-2.html</a>:</p>
|
||
<pre><code>Capitalized, short (50 chars or less) summary
|
||
|
||
More detailed explanatory text, if necessary. Wrap it to about 72
|
||
characters or so. In some contexts, the first line is treated as the
|
||
subject of an email and the rest of the text as the body. The blank
|
||
line separating the summary from the body is critical (unless you omit
|
||
the body entirely); tools like rebase will confuse you if you run the
|
||
two together.
|
||
|
||
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
|
||
or "Fixes bug." This convention matches up with commit messages generated
|
||
by commands like git merge and git revert.
|
||
|
||
Further paragraphs come after blank lines.
|
||
|
||
- Bullet points are okay, too
|
||
|
||
- Typically a hyphen or asterisk is used for the bullet, followed by a
|
||
single space, with blank lines in between, but conventions vary here
|
||
|
||
- Use a hanging indent
|
||
</code></pre>
|
||
<p>Furthermore, here are a few examples for a summary line:</p>
|
||
<ul>
|
||
<li>commit for a single utility</li>
|
||
</ul>
|
||
<pre><code>nohup: cleanup and refactor
|
||
</code></pre>
|
||
<ul>
|
||
<li>commit for a utility's tests</li>
|
||
</ul>
|
||
<pre><code>tests/rm: test new feature
|
||
</code></pre>
|
||
<p>Beyond changes to an individual utility or its tests, other summary
|
||
lines for non-utility modules include:</p>
|
||
<pre><code>README: add help
|
||
</code></pre>
|
||
<pre><code>uucore: add new modules
|
||
</code></pre>
|
||
<pre><code>uutils: add new utility
|
||
</code></pre>
|
||
<pre><code>gitignore: add temporary files
|
||
</code></pre>
|
||
<h2 id="code-coverage"><a class="header" href="#code-coverage">Code coverage</a></h2>
|
||
<!-- spell-checker:ignore (flags) Ccodegen Coverflow Cpanic Zinstrument Zpanic -->
|
||
<p>Code coverage report can be generated using <a href="https://github.com/mozilla/grcov">grcov</a>.</p>
|
||
<h3 id="using-nightly-rust"><a class="header" href="#using-nightly-rust">Using Nightly Rust</a></h3>
|
||
<p>To generate <a href="https://github.com/mozilla/grcov#example-how-to-generate-gcda-files-for-a-rust-project">gcov-based</a> coverage report</p>
|
||
<pre><code class="language-shell">export CARGO_INCREMENTAL=0
|
||
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
||
export RUSTDOCFLAGS="-Cpanic=abort"
|
||
cargo build <options...> # e.g., --features feat_os_unix
|
||
cargo test <options...> # e.g., --features feat_os_unix test_pathchk
|
||
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing --ignore build.rs --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?\#\[derive\()" -o ./target/debug/coverage/
|
||
# open target/debug/coverage/index.html in browser
|
||
</code></pre>
|
||
<p>if changes are not reflected in the report then run <code>cargo clean</code> and run the above commands.</p>
|
||
<h3 id="using-stable-rust"><a class="header" href="#using-stable-rust">Using Stable Rust</a></h3>
|
||
<p>If you are using stable version of Rust that doesn't enable code coverage instrumentation by default
|
||
then add <code>-Z-Zinstrument-coverage</code> flag to <code>RUSTFLAGS</code> env variable specified above.</p>
|
||
<h2 id="other-implementations"><a class="header" href="#other-implementations">Other implementations</a></h2>
|
||
<p>The Coreutils have different implementations, with different levels of completions:</p>
|
||
<ul>
|
||
<li><a href="https://git.savannah.gnu.org/gitweb/?p=coreutils.git">GNU's</a></li>
|
||
<li><a href="https://github.com/openbsd/src/tree/master/bin">OpenBSD</a></li>
|
||
<li><a href="https://github.com/mirror/busybox/tree/master/coreutils">Busybox</a></li>
|
||
<li><a href="https://github.com/landley/toybox/tree/master/toys/posix">Toybox (Android)</a></li>
|
||
<li><a href="https://github.com/vlang/coreutils">V lang</a></li>
|
||
<li><a href="https://github.com/SerenityOS/serenity/tree/master/Userland/Utilities">SerenityOS</a></li>
|
||
<li><a href="https://github.com/dspinellis/unix-history-repo">Initial Unix</a></li>
|
||
</ul>
|
||
<p>However, when reimplementing the tools/options in Rust, don't read their source codes
|
||
when they are using reciprocal licenses (ex: GNU GPL, GNU LGPL, etc).</p>
|
||
<h2 id="licensing"><a class="header" href="#licensing">Licensing</a></h2>
|
||
<p>uutils is distributed under the terms of the MIT License; see the <code>LICENSE</code> file
|
||
for details. This is a permissive license, which allows the software to be used
|
||
with few restrictions.</p>
|
||
<p>Copyrights in the uutils project are retained by their contributors, and no
|
||
copyright assignment is required to contribute.</p>
|
||
<p>If you wish to add or change dependencies as part of a contribution to the
|
||
project, a tool like <code>cargo-license</code> can be used to show their license details.
|
||
The following types of license are acceptable:</p>
|
||
<ul>
|
||
<li>MIT License</li>
|
||
<li>Dual- or tri-license with an MIT License option ("Apache-2.0 or MIT" is a
|
||
popular combination)</li>
|
||
<li>"MIT equivalent" license (2-clause BSD, 3-clause BSD, ISC)</li>
|
||
<li>License less restrictive than the MIT License (CC0 1.0 Universal)</li>
|
||
<li>Apache License version 2.0</li>
|
||
</ul>
|
||
<p>Licenses we will not use:</p>
|
||
<ul>
|
||
<li>An ambiguous license, or no license</li>
|
||
<li>Strongly reciprocal licenses (GNU GPL, GNU LGPL)</li>
|
||
</ul>
|
||
<p>If you wish to add a reference but it doesn't meet these requirements, please
|
||
raise an issue to describe the dependency.</p>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="gnu-test-coverage"><a class="header" href="#gnu-test-coverage">GNU Test Coverage</a></h1>
|
||
<!-- markdownlint-disable MD033 -->
|
||
<p>uutils is actively tested against the GNU coreutils test suite. The results
|
||
below are automatically updated every day.</p>
|
||
<h2 id="coverage-per-category"><a class="header" href="#coverage-per-category">Coverage per category</a></h2>
|
||
<p>Click on the categories to see the names of the tests. Green indicates a passing
|
||
test, yellow indicates a skipped test and red means that the test either failed
|
||
or resulted in an error.</p>
|
||
<link rel="stylesheet" href="test_coverage.css">
|
||
<script src="test_coverage.js"></script>
|
||
<div id="test-cov"></div>
|
||
<h2 id="progress-over-time"><a class="header" href="#progress-over-time">Progress over time</a></h2>
|
||
<image src="https://github.com/uutils/coreutils-tracking/blob/main/gnu-results.png?raw=true">
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="extensions-over-gnu"><a class="header" href="#extensions-over-gnu">Extensions over GNU</a></h1>
|
||
<p>Though the main goal of the project is compatibility, uutils supports a few
|
||
features that are not supported by GNU coreutils. We take care not to introduce
|
||
features that are incompatible with the GNU coreutils. Below is a list of uutils
|
||
extensions.</p>
|
||
<h2 id="general"><a class="header" href="#general">General</a></h2>
|
||
<p>GNU coreutils provides two ways to define short options taking an argument:</p>
|
||
<pre><code>$ ls -w 80
|
||
$ ls -w80
|
||
</code></pre>
|
||
<p>We support a third way:</p>
|
||
<pre><code>$ ls -w=80
|
||
</code></pre>
|
||
<h2 id="env"><a class="header" href="#env"><code>env</code></a></h2>
|
||
<p><code>env</code> has an additional <code>-f</code>/<code>--file</code> flag that can parse <code>.env</code> files and set
|
||
variables accordingly. This feature is adopted from <code>dotenv</code> style packages.</p>
|
||
<h2 id="cp"><a class="header" href="#cp"><code>cp</code></a></h2>
|
||
<p><code>cp</code> can display a progress bar when the <code>-g</code>/<code>--progress</code> flag is set.</p>
|
||
<h2 id="mv"><a class="header" href="#mv"><code>mv</code></a></h2>
|
||
<p><code>mv</code> can display a progress bar when the <code>-g</code>/<code>--progress</code> flag is set.</p>
|
||
<h2 id="hashsum"><a class="header" href="#hashsum"><code>hashsum</code></a></h2>
|
||
<p>This utility does not exist in GNU coreutils. <code>hashsum</code> is a utility that
|
||
supports computing the checksums with several algorithms. The flags and options
|
||
are identical to the <code>*sum</code> family of utils (<code>sha1sum</code>, <code>sha256sum</code>, <code>b2sum</code>,
|
||
etc.).</p>
|
||
<h2 id="b3sum"><a class="header" href="#b3sum"><code>b3sum</code></a></h2>
|
||
<p>This utility does not exist in GNU coreutils. The behavior is modeled after both
|
||
the <code>b2sum</code> utility of GNU and the
|
||
<a href="https://github.com/BLAKE3-team/BLAKE3"><code>b3sum</code></a> utility by the BLAKE3 team and
|
||
supports the <code>--no-names</code> option that does not appear in the GNU util.</p>
|
||
<h2 id="more"><a class="header" href="#more"><code>more</code></a></h2>
|
||
<p>We provide a simple implementation of <code>more</code>, which is not part of GNU
|
||
coreutils. We do not aim for full compatibility with the <code>more</code> utility from
|
||
<code>util-linux</code>. Features from more modern pagers (like <code>less</code> and <code>bat</code>) are
|
||
therefore welcomed.</p>
|
||
<h2 id="cut"><a class="header" href="#cut"><code>cut</code></a></h2>
|
||
<p><code>cut</code> can separate fields by whitespace (Space and Tab) with <code>-w</code> flag. This
|
||
feature is adopted from <a href="https://www.freebsd.org/cgi/man.cgi?cut">FreeBSD</a>.</p>
|
||
<h2 id="fmt"><a class="header" href="#fmt"><code>fmt</code></a></h2>
|
||
<p><code>fmt</code> has additional flags for prefixes: <code>-P/--skip-prefix</code>, <code>-x/--exact-prefix</code>, and
|
||
<code>-X/--exact-skip-prefix</code>. With <code>-m/--preserve-headers</code>, an attempt is made to detect and preserve
|
||
mail headers in the input. <code>-q/--quick</code> breaks lines more quickly. And <code>-T/--tab-width</code> defines the
|
||
number of spaces representing a tab when determining the line length.</p>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="multi-call-binary"><a class="header" href="#multi-call-binary">Multi-call binary</a></h1>
|
||
<p>uutils includes a multi-call binary from which the utils can be invoked. This
|
||
reduces the binary size of the binary and can be useful for portability.</p>
|
||
<p>The first argument of the multi-call binary is the util to run, after which
|
||
the regular arguments to the util can be passed.</p>
|
||
<pre><code class="language-shell">coreutils [util] [util options]
|
||
</code></pre>
|
||
<p>The <code>--help</code> flag will print a list of available utils.</p>
|
||
<h2 id="example"><a class="header" href="#example">Example</a></h2>
|
||
<pre><code class="language-shell">coreutils ls -l
|
||
</code></pre>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="arch-1"><a class="header" href="#arch-1">arch</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>arch
|
||
</code></pre>
|
||
<p>Display machine architecture</p>
|
||
<h2 id="options"><a class="header" href="#options">Options</a></h2>
|
||
<dl></dl>
|
||
<p>Determine architecture name for current machine.</p>
|
||
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
|
||
<p>Display the system's architecture:</p>
|
||
<pre><code class="language-shell">arch
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="b2sum"><a class="header" href="#b2sum">b2sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-1"><a class="header" href="#options-1">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-1"><a class="header" href="#examples-1">Examples</a></h2>
|
||
<p>Calculate the BLAKE2 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">b2sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of BLAKE2 checksums to a file:</p>
|
||
<pre><code class="language-shell">b2sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.b2}}
|
||
</code></pre>
|
||
<p>Calculate a BLAKE2 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | b2sum
|
||
</code></pre>
|
||
<p>Read a file of BLAKE2 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">b2sum --check {{path/to/file.b2}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">b2sum --check --quiet {{path/to/file.b2}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">b2sum --ignore-missing --check --quiet {{path/to/file.b2}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="b3sum-1"><a class="header" href="#b3sum-1">b3sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-2"><a class="header" href="#options-2">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--no-names</code></dt>
|
||
<dd>
|
||
<p>Omits filenames in the output (option not present in GNU/Coreutils)</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-2"><a class="header" href="#examples-2">Examples</a></h2>
|
||
<p>Calculate the BLAKE3 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">b3sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of BLAKE3 checksums to a file:</p>
|
||
<pre><code class="language-shell">b3sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.b3}}
|
||
</code></pre>
|
||
<p>Calculate a BLAKE3 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | b3sum
|
||
</code></pre>
|
||
<p>Read a file of BLAKE3 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">b3sum --check {{path/to/file.b3}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">b3sum --check --quiet {{path/to/file.b3}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="base32"><a class="header" href="#base32">base32</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>base32 [OPTION]... [FILE]
|
||
</code></pre>
|
||
<p>encode/decode data and print to standard output
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<p>The data are encoded as described for the base32 alphabet in RFC 4648.
|
||
When decoding, the input may contain newlines in addition
|
||
to the bytes of the formal base32 alphabet. Use --ignore-garbage
|
||
to attempt to recover from any other non-alphabet bytes in the
|
||
encoded stream.</p>
|
||
<h2 id="options-3"><a class="header" href="#options-3">Options</a></h2>
|
||
<dl><dt><code>--decode</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>decode data</p>
|
||
</dd>
|
||
<dt><code>--ignore-garbage</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>when decoding, ignore non-alphabetic characters</p>
|
||
</dd>
|
||
<dt><code>--wrap=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>wrap encoded lines after COLS character (default 76, 0 to disable wrapping)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-3"><a class="header" href="#examples-3">Examples</a></h2>
|
||
<p>Encode a file:</p>
|
||
<pre><code class="language-shell">base32 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Decode a file:</p>
|
||
<pre><code class="language-shell">base32 --decode {{path/to/file}}
|
||
</code></pre>
|
||
<p>Encode from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{somecommand}} | base32
|
||
</code></pre>
|
||
<p>Decode from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{somecommand}} | base32 --decode
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="base64"><a class="header" href="#base64">base64</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>base64 [OPTION]... [FILE]
|
||
</code></pre>
|
||
<p>encode/decode data and print to standard output
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<p>The data are encoded as described for the base64 alphabet in RFC 3548.
|
||
When decoding, the input may contain newlines in addition
|
||
to the bytes of the formal base64 alphabet. Use --ignore-garbage
|
||
to attempt to recover from any other non-alphabet bytes in the
|
||
encoded stream.</p>
|
||
<h2 id="options-4"><a class="header" href="#options-4">Options</a></h2>
|
||
<dl><dt><code>--decode</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>decode data</p>
|
||
</dd>
|
||
<dt><code>--ignore-garbage</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>when decoding, ignore non-alphabetic characters</p>
|
||
</dd>
|
||
<dt><code>--wrap=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>wrap encoded lines after COLS character (default 76, 0 to disable wrapping)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-4"><a class="header" href="#examples-4">Examples</a></h2>
|
||
<p>Encode the contents of a file as base64 and write the result to <code>stdout</code>:</p>
|
||
<pre><code class="language-shell">base64 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Decode the base64 contents of a file and write the result to <code>stdout</code>:</p>
|
||
<pre><code class="language-shell">base64 --decode {{path/to/file}}
|
||
</code></pre>
|
||
<p>Encode from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{somecommand}} | base64
|
||
</code></pre>
|
||
<p>Decode from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{somecommand}} | base64 --decode
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="basename"><a class="header" href="#basename">basename</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>basename NAME [SUFFIX]
|
||
basename OPTION... NAME...
|
||
</code></pre>
|
||
<p>Print NAME with any leading directory components removed
|
||
If specified, also remove a trailing SUFFIX</p>
|
||
<h2 id="options-5"><a class="header" href="#options-5">Options</a></h2>
|
||
<dl><dt><code>--multiple</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>support multiple arguments and treat each as a NAME</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code>, <code>-s <SUFFIX></code></dt>
|
||
<dd>
|
||
<p>remove a trailing SUFFIX; implies -a</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-5"><a class="header" href="#examples-5">Examples</a></h2>
|
||
<p>Show only the file name from a path:</p>
|
||
<pre><code class="language-shell">basename {{path/to/file}}
|
||
</code></pre>
|
||
<p>Show only the rightmost directory name from a path:</p>
|
||
<pre><code class="language-shell">basename {{path/to/directory/}}
|
||
</code></pre>
|
||
<p>Show only the file name from a path, with a suffix removed:</p>
|
||
<pre><code class="language-shell">basename {{path/to/file}} {{suffix}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="basenc"><a class="header" href="#basenc">basenc</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>basenc [OPTION]... [FILE]"
|
||
</code></pre>
|
||
<p>Encode/decode data and print to standard output
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<p>When decoding, the input may contain newlines in addition to the bytes of
|
||
the formal alphabet. Use --ignore-garbage to attempt to recover
|
||
from any other non-alphabet bytes in the encoded stream.</p>
|
||
<h2 id="options-6"><a class="header" href="#options-6">Options</a></h2>
|
||
<dl><dt><code>--decode</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>decode data</p>
|
||
</dd>
|
||
<dt><code>--ignore-garbage</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>when decoding, ignore non-alphabetic characters</p>
|
||
</dd>
|
||
<dt><code>--wrap=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>wrap encoded lines after COLS character (default 76, 0 to disable wrapping)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--base64</code></dt>
|
||
<dd>
|
||
<p>same as 'base64' program</p>
|
||
</dd>
|
||
<dt><code>--base64url</code></dt>
|
||
<dd>
|
||
<p>file- and url-safe base64</p>
|
||
</dd>
|
||
<dt><code>--base32</code></dt>
|
||
<dd>
|
||
<p>same as 'base32' program</p>
|
||
</dd>
|
||
<dt><code>--base32hex</code></dt>
|
||
<dd>
|
||
<p>extended hex alphabet base32</p>
|
||
</dd>
|
||
<dt><code>--base16</code></dt>
|
||
<dd>
|
||
<p>hex encoding</p>
|
||
</dd>
|
||
<dt><code>--base2lsbf</code></dt>
|
||
<dd>
|
||
<p>bit string with least significant bit (lsb) first</p>
|
||
</dd>
|
||
<dt><code>--base2msbf</code></dt>
|
||
<dd>
|
||
<p>bit string with most significant bit (msb) first</p>
|
||
</dd>
|
||
<dt><code>--z85</code></dt>
|
||
<dd>
|
||
<p>ascii85-like encoding;<br />when encoding, input length must be a multiple of 4;<br />when decoding, input length must be a multiple of 5</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-6"><a class="header" href="#examples-6">Examples</a></h2>
|
||
<p>Encode a file with base64 encoding:</p>
|
||
<pre><code class="language-shell">basenc --base64 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Decode a file with base64 encoding:</p>
|
||
<pre><code class="language-shell">basenc --decode --base64 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Encode from <code>stdin</code> with base32 encoding with 42 columns:</p>
|
||
<pre><code class="language-shell">{{command}} | basenc --base32 -w42
|
||
</code></pre>
|
||
<p>Encode from <code>stdin</code> with base32 encoding:</p>
|
||
<pre><code class="language-shell">{{command}} | basenc --base32
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="cat"><a class="header" href="#cat">cat</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>cat [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Concatenate FILE(s), or standard input, to standard output
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<h2 id="options-7"><a class="header" href="#options-7">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--show-all</code>, <code>-A</code></dt>
|
||
<dd>
|
||
<p>equivalent to -vET</p>
|
||
</dd>
|
||
<dt><code>--number-nonblank</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>number nonempty output lines, overrides -n</p>
|
||
</dd>
|
||
<dt><code>-e</code></dt>
|
||
<dd>
|
||
<p>equivalent to -vE</p>
|
||
</dd>
|
||
<dt><code>--show-ends</code>, <code>-E</code></dt>
|
||
<dd>
|
||
<p>display $ at end of each line</p>
|
||
</dd>
|
||
<dt><code>--number</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>number all output lines</p>
|
||
</dd>
|
||
<dt><code>--squeeze-blank</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>suppress repeated empty output lines</p>
|
||
</dd>
|
||
<dt><code>--t</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>equivalent to -vT</p>
|
||
</dd>
|
||
<dt><code>--show-tabs</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>display TAB characters at ^I</p>
|
||
</dd>
|
||
<dt><code>--show-nonprinting</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>use ^ and M- notation, except for LF (\n) and TAB (\t)</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-7"><a class="header" href="#examples-7">Examples</a></h2>
|
||
<p>Print the contents of a file to the standard output:</p>
|
||
<pre><code class="language-shell">cat {{path/to/file}}
|
||
</code></pre>
|
||
<p>Concatenate several files into an output file:</p>
|
||
<pre><code class="language-shell">cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}
|
||
</code></pre>
|
||
<p>Append several files to an output file:</p>
|
||
<pre><code class="language-shell">cat {{path/to/file1 path/to/file2 ...}} >> {{path/to/output_file}}
|
||
</code></pre>
|
||
<p>Copy the contents of a file into an output file without buffering:</p>
|
||
<pre><code class="language-shell">cat -u {{/dev/tty12}} > {{/dev/tty13}}
|
||
</code></pre>
|
||
<p>Write <code>stdin</code> to a file:</p>
|
||
<pre><code class="language-shell">cat - > {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="chcon"><a class="header" href="#chcon">chcon</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>chcon [OPTION]... CONTEXT FILE...
|
||
chcon [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...
|
||
chcon [OPTION]... --reference=RFILE FILE...
|
||
</code></pre>
|
||
<p>Change the SELinux security context of each FILE to CONTEXT.
|
||
With --reference, change the security context of each FILE to that of RFILE.</p>
|
||
<h2 id="options-8"><a class="header" href="#options-8">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--dereference</code></dt>
|
||
<dd>
|
||
<p>Affect the referent of each symbolic link (this is the default), rather than the symbolic link itself.</p>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>Affect symbolic links instead of any referenced file.</p>
|
||
</dd>
|
||
<dt><code>--preserve-root</code></dt>
|
||
<dd>
|
||
<p>Fail to operate recursively on '/'.</p>
|
||
</dd>
|
||
<dt><code>--no-preserve-root</code></dt>
|
||
<dd>
|
||
<p>Do not treat '/' specially (the default).</p>
|
||
</dd>
|
||
<dt><code>--reference=<RFILE></code></dt>
|
||
<dd>
|
||
<p>Use security context of RFILE, rather than specifying a CONTEXT value.</p>
|
||
</dd>
|
||
<dt><code>--user=<USER></code>, <code>-u <USER></code></dt>
|
||
<dd>
|
||
<p>Set user USER in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--role=<ROLE></code>, <code>-r <ROLE></code></dt>
|
||
<dd>
|
||
<p>Set role ROLE in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--type=<TYPE></code>, <code>-t <TYPE></code></dt>
|
||
<dd>
|
||
<p>Set type TYPE in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--range=<RANGE></code>, <code>-l <RANGE></code></dt>
|
||
<dd>
|
||
<p>Set range RANGE in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>Operate on files and directories recursively.</p>
|
||
</dd>
|
||
<dt><code>-H</code></dt>
|
||
<dd>
|
||
<p>If a command line argument is a symbolic link to a directory, traverse it. Only valid when -R is specified.</p>
|
||
</dd>
|
||
<dt><code>-L</code></dt>
|
||
<dd>
|
||
<p>Traverse every symbolic link to a directory encountered. Only valid when -R is specified.</p>
|
||
</dd>
|
||
<dt><code>-P</code></dt>
|
||
<dd>
|
||
<p>Do not traverse any symbolic links (default). Only valid when -R is specified.</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>Output a diagnostic for every file processed.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-8"><a class="header" href="#examples-8">Examples</a></h2>
|
||
<p>View security context of a file:</p>
|
||
<pre><code class="language-shell">ls -lZ {{path/to/file}}
|
||
</code></pre>
|
||
<p>Change the security context of a target file, using a reference file:</p>
|
||
<pre><code class="language-shell">chcon --reference={{reference_file}} {{target_file}}
|
||
</code></pre>
|
||
<p>Change the full SELinux security context of a file:</p>
|
||
<pre><code class="language-shell">chcon {{user}}:{{role}}:{{type}}:{{range/level}} {{filename}}
|
||
</code></pre>
|
||
<p>Change only the user part of SELinux security context:</p>
|
||
<pre><code class="language-shell">chcon -u {{user}} {{filename}}
|
||
</code></pre>
|
||
<p>Change only the role part of SELinux security context:</p>
|
||
<pre><code class="language-shell">chcon -r {{role}} {{filename}}
|
||
</code></pre>
|
||
<p>Change only the type part of SELinux security context:</p>
|
||
<pre><code class="language-shell">chcon -t {{type}} {{filename}}
|
||
</code></pre>
|
||
<p>Change only the range/level part of SELinux security context:</p>
|
||
<pre><code class="language-shell">chcon -l {{range/level}} {{filename}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="chgrp"><a class="header" href="#chgrp">chgrp</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>chgrp [OPTION]... GROUP FILE...
|
||
chgrp [OPTION]... --reference=RFILE FILE...
|
||
</code></pre>
|
||
<p>Change the group of each FILE to GROUP.</p>
|
||
<h2 id="options-9"><a class="header" href="#options-9">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--changes</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>like verbose but report only when a change is made</p>
|
||
</dd>
|
||
<dt><code>--silent</code>, <code>-f</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--quiet</code></dt>
|
||
<dd>
|
||
<p>suppress most error messages</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>output a diagnostic for every file processed</p>
|
||
</dd>
|
||
<dt><code>--dereference</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink)</p>
|
||
</dd>
|
||
<dt><code>--preserve-root</code></dt>
|
||
<dd>
|
||
<p>fail to operate recursively on '/'</p>
|
||
</dd>
|
||
<dt><code>--no-preserve-root</code></dt>
|
||
<dd>
|
||
<p>do not treat '/' specially (the default)</p>
|
||
</dd>
|
||
<dt><code>--reference=<RFILE></code></dt>
|
||
<dd>
|
||
<p>use RFILE's group rather than specifying GROUP values</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>operate on files and directories recursively</p>
|
||
</dd>
|
||
<dt><code>-H</code></dt>
|
||
<dd>
|
||
<p>if a command line argument is a symbolic link to a directory, traverse it</p>
|
||
</dd>
|
||
<dt><code>-P</code></dt>
|
||
<dd>
|
||
<p>do not traverse any symbolic links (default)</p>
|
||
</dd>
|
||
<dt><code>-L</code></dt>
|
||
<dd>
|
||
<p>traverse every symbolic link to a directory encountered</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-9"><a class="header" href="#examples-9">Examples</a></h2>
|
||
<p>Change the owner group of a file/directory:</p>
|
||
<pre><code class="language-shell">chgrp {{group}} {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Recursively change the owner group of a directory and its contents:</p>
|
||
<pre><code class="language-shell">chgrp -R {{group}} {{path/to/directory}}
|
||
</code></pre>
|
||
<p>Change the owner group of a symbolic link:</p>
|
||
<pre><code class="language-shell">chgrp -h {{group}} {{path/to/symlink}}
|
||
</code></pre>
|
||
<p>Change the owner group of a file/directory to match a reference file:</p>
|
||
<pre><code class="language-shell">chgrp --reference={{path/to/reference_file}} {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="chmod"><a class="header" href="#chmod">chmod</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>chmod [OPTION]... MODE[,MODE]... FILE...
|
||
chmod [OPTION]... OCTAL-MODE FILE...
|
||
chmod [OPTION]... --reference=RFILE FILE...
|
||
</code></pre>
|
||
<p>Change the mode of each FILE to MODE.
|
||
With --reference, change the mode of each FILE to that of RFILE.</p>
|
||
<h2 id="options-10"><a class="header" href="#options-10">Options</a></h2>
|
||
<dl><dt><code>--changes</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>like verbose but report only when a change is made</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>--silent</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>suppress most error messages</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>output a diagnostic for every file processed</p>
|
||
</dd>
|
||
<dt><code>--no-preserve-root</code></dt>
|
||
<dd>
|
||
<p>do not treat '/' specially (the default)</p>
|
||
</dd>
|
||
<dt><code>--preserve-root</code></dt>
|
||
<dd>
|
||
<p>fail to operate recursively on '/'</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>change files and directories recursively</p>
|
||
</dd>
|
||
<dt><code>--reference</code></dt>
|
||
<dd>
|
||
<p>use RFILE's mode instead of MODE values</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Each MODE is of the form '[ugoa]*(<a href="utils/%5BrwxXst%5D*%7C%5Bugo%5D">-+=</a>)+|[-+=]?[0-7]+'.</p>
|
||
<h2 id="examples-10"><a class="header" href="#examples-10">Examples</a></h2>
|
||
<p>Give the [u]ser who owns a file the right to e[x]ecute it:</p>
|
||
<pre><code class="language-shell">chmod u+x {{path/to/file}}
|
||
</code></pre>
|
||
<p>Give the [u]ser rights to [r]ead and [w]rite to a file/directory:</p>
|
||
<pre><code class="language-shell">chmod u+rw {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Remove e[x]ecutable rights from the [g]roup:</p>
|
||
<pre><code class="language-shell">chmod g-x {{path/to/file}}
|
||
</code></pre>
|
||
<p>Give [a]ll users rights to [r]ead and e[x]ecute:</p>
|
||
<pre><code class="language-shell">chmod a+rx {{path/to/file}}
|
||
</code></pre>
|
||
<p>Give [o]thers (not in the file owner's group) the same rights as the [g]roup:</p>
|
||
<pre><code class="language-shell">chmod o=g {{path/to/file}}
|
||
</code></pre>
|
||
<p>Remove all rights from [o]thers:</p>
|
||
<pre><code class="language-shell">chmod o= {{path/to/file}}
|
||
</code></pre>
|
||
<p>Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite:</p>
|
||
<pre><code class="language-shell">chmod -R g+w,o+w {{path/to/directory}}
|
||
</code></pre>
|
||
<p>Recursively give [a]ll users [r]ead permissions to files and e[X]ecute permissions to sub-directories within a directory:</p>
|
||
<pre><code class="language-shell">chmod -R a+rX {{path/to/directory}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="chown"><a class="header" href="#chown">chown</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>chown [OPTION]... [OWNER][:[GROUP]] FILE...
|
||
chown [OPTION]... --reference=RFILE FILE...
|
||
</code></pre>
|
||
<p>Change file owner and group</p>
|
||
<h2 id="options-11"><a class="header" href="#options-11">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--changes</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>like verbose but report only when a change is made</p>
|
||
</dd>
|
||
<dt><code>--dereference</code></dt>
|
||
<dd>
|
||
<p>affect the referent of each symbolic link (this is the default), rather than the symbolic link itself</p>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink)</p>
|
||
</dd>
|
||
<dt><code>--from=<CURRENT_OWNER:CURRENT_GROUP></code></dt>
|
||
<dd>
|
||
<p>change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute</p>
|
||
</dd>
|
||
<dt><code>--preserve-root</code></dt>
|
||
<dd>
|
||
<p>fail to operate recursively on '/'</p>
|
||
</dd>
|
||
<dt><code>--no-preserve-root</code></dt>
|
||
<dd>
|
||
<p>do not treat '/' specially (the default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code></dt>
|
||
<dd>
|
||
<p>suppress most error messages</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>operate on files and directories recursively</p>
|
||
</dd>
|
||
<dt><code>--reference=<RFILE></code></dt>
|
||
<dd>
|
||
<p>use RFILE's owner and group rather than specifying OWNER:GROUP values</p>
|
||
</dd>
|
||
<dt><code>--silent</code>, <code>-f</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-H</code></dt>
|
||
<dd>
|
||
<p>if a command line argument is a symbolic link to a directory, traverse it</p>
|
||
</dd>
|
||
<dt><code>-L</code></dt>
|
||
<dd>
|
||
<p>traverse every symbolic link to a directory encountered</p>
|
||
</dd>
|
||
<dt><code>-P</code></dt>
|
||
<dd>
|
||
<p>do not traverse any symbolic links (default)</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>output a diagnostic for every file processed</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-11"><a class="header" href="#examples-11">Examples</a></h2>
|
||
<p>Change the owner user of a file/directory:</p>
|
||
<pre><code class="language-shell">chown {{user}} {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Change the owner user and group of a file/directory:</p>
|
||
<pre><code class="language-shell">chown {{user}}:{{group}} {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Recursively change the owner of a directory and its contents:</p>
|
||
<pre><code class="language-shell">chown -R {{user}} {{path/to/directory}}
|
||
</code></pre>
|
||
<p>Change the owner of a symbolic link:</p>
|
||
<pre><code class="language-shell">chown -h {{user}} {{path/to/symlink}}
|
||
</code></pre>
|
||
<p>Change the owner of a file/directory to match a reference file:</p>
|
||
<pre><code class="language-shell">chown --reference={{path/to/reference_file}} {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="chroot"><a class="header" href="#chroot">chroot</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>chroot [OPTION]... NEWROOT [COMMAND [ARG]...]
|
||
</code></pre>
|
||
<p>Run COMMAND with root directory set to NEWROOT.</p>
|
||
<h2 id="options-12"><a class="header" href="#options-12">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--user=<USER></code>, <code>-u <USER></code></dt>
|
||
<dd>
|
||
<p>User (ID or name) to switch before running the program</p>
|
||
</dd>
|
||
<dt><code>--group=<GROUP></code>, <code>-g <GROUP></code></dt>
|
||
<dd>
|
||
<p>Group (ID or name) to switch to</p>
|
||
</dd>
|
||
<dt><code>--groups=<GROUP1,GROUP2...></code>, <code>-G <GROUP1,GROUP2...></code></dt>
|
||
<dd>
|
||
<p>Comma-separated list of groups to switch to</p>
|
||
</dd>
|
||
<dt><code>--userspec=<USER:GROUP></code></dt>
|
||
<dd>
|
||
<p>Colon-separated user and group to switch to. Same as -u USER -g GROUP. Userspec has higher preference than -u and/or -g</p>
|
||
</dd>
|
||
<dt><code>--skip-chdir</code></dt>
|
||
<dd>
|
||
<p>Use this option to not change the working directory to / after changing the root directory to newroot, i.e., inside the chroot.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-12"><a class="header" href="#examples-12">Examples</a></h2>
|
||
<p>Run command as new root directory:</p>
|
||
<pre><code class="language-shell">chroot {{path/to/new/root}} {{command}}
|
||
</code></pre>
|
||
<p>Specify user and group (ID or name) to use:</p>
|
||
<pre><code class="language-shell">chroot --userspec={{user:group}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="cksum"><a class="header" href="#cksum">cksum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>cksum [OPTIONS] [FILE]...
|
||
</code></pre>
|
||
<p>Print CRC and size for each file</p>
|
||
<h2 id="options-13"><a class="header" href="#options-13">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--algorithm=<ALGORITHM></code>, <code>-a <ALGORITHM></code></dt>
|
||
<dd>
|
||
<p>select the digest type to use. See DIGEST below</p>
|
||
</dd>
|
||
<dt><code>--untagged</code></dt>
|
||
<dd>
|
||
<p>create a reversed style checksum, without digest type</p>
|
||
</dd>
|
||
</dl>
|
||
<p>DIGEST determines the digest algorithm and default output format:</p>
|
||
<ul>
|
||
<li><code>sysv</code>: (equivalent to sum -s)</li>
|
||
<li><code>bsd</code>: (equivalent to sum -r)</li>
|
||
<li><code>crc</code>: (equivalent to cksum)</li>
|
||
<li><code>md5</code>: (equivalent to md5sum)</li>
|
||
<li><code>sha1</code>: (equivalent to sha1sum)</li>
|
||
<li><code>sha224</code>: (equivalent to sha224sum)</li>
|
||
<li><code>sha256</code>: (equivalent to sha256sum)</li>
|
||
<li><code>sha384</code>: (equivalent to sha384sum)</li>
|
||
<li><code>sha512</code>: (equivalent to sha512sum)</li>
|
||
<li><code>blake2b</code>: (equivalent to b2sum)</li>
|
||
<li><code>sm3</code>: (only available through cksum)</li>
|
||
</ul>
|
||
<h2 id="examples-13"><a class="header" href="#examples-13">Examples</a></h2>
|
||
<p>Display a 32-bit checksum, size in bytes and filename:</p>
|
||
<pre><code class="language-shell">cksum {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="comm"><a class="header" href="#comm">comm</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>comm [OPTION]... FILE1 FILE2
|
||
</code></pre>
|
||
<p>Compare two sorted files line by line.</p>
|
||
<p>When FILE1 or FILE2 (not both) is -, read standard input.</p>
|
||
<p>With no options, produce three-column output. Column one contains
|
||
lines unique to FILE1, column two contains lines unique to FILE2,
|
||
and column three contains lines common to both files.</p>
|
||
<h2 id="options-14"><a class="header" href="#options-14">Options</a></h2>
|
||
<dl><dt><code>-1</code></dt>
|
||
<dd>
|
||
<p>suppress column 1 (lines unique to FILE1)</p>
|
||
</dd>
|
||
<dt><code>-2</code></dt>
|
||
<dd>
|
||
<p>suppress column 2 (lines unique to FILE2)</p>
|
||
</dd>
|
||
<dt><code>-3</code></dt>
|
||
<dd>
|
||
<p>suppress column 3 (lines that appear in both files)</p>
|
||
</dd>
|
||
<dt><code>--output-delimiter=<STR></code></dt>
|
||
<dd>
|
||
<p>separate columns with STR</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--total</code></dt>
|
||
<dd>
|
||
<p>output a summary</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-14"><a class="header" href="#examples-14">Examples</a></h2>
|
||
<p>Produce three tab-separated columns: lines only in first file, lines only in second file and common lines:</p>
|
||
<pre><code class="language-shell">comm {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Print only lines common to both files:</p>
|
||
<pre><code class="language-shell">comm -12 {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Print only lines common to both files, reading one file from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">cat {{file1}} | comm -12 - {{file2}}
|
||
</code></pre>
|
||
<p>Get lines only found in first file, saving the result to a third file:</p>
|
||
<pre><code class="language-shell">comm -23 {{file1}} {{file2}} > {{file1_only}}
|
||
</code></pre>
|
||
<p>Print lines only found in second file, when the files aren't sorted:</p>
|
||
<pre><code class="language-shell">comm -13 <(sort {{file1}}) <(sort {{file2}})
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="cp-1"><a class="header" href="#cp-1">cp</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>cp [OPTION]... [-T] SOURCE DEST
|
||
cp [OPTION]... SOURCE... DIRECTORY
|
||
cp [OPTION]... -t DIRECTORY SOURCE...
|
||
</code></pre>
|
||
<p>Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.</p>
|
||
<h2 id="options-15"><a class="header" href="#options-15">Options</a></h2>
|
||
<dl><dt><code>--target-directory=<target-directory></code>, <code>-t <target-directory></code></dt>
|
||
<dd>
|
||
<p>copy all SOURCE arguments into target-directory</p>
|
||
</dd>
|
||
<dt><code>--no-target-directory</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>Treat DEST as a regular file and not a directory</p>
|
||
</dd>
|
||
<dt><code>--interactive</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>ask before overwriting files</p>
|
||
</dd>
|
||
<dt><code>--link</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>hard-link files instead of copying</p>
|
||
</dd>
|
||
<dt><code>--no-clobber</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>don't overwrite a file that already exists</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-r</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>copy directories recursively</p>
|
||
</dd>
|
||
<dt><code>--strip-trailing-slashes</code></dt>
|
||
<dd>
|
||
<p>remove any trailing slashes from each SOURCE argument</p>
|
||
</dd>
|
||
<dt><code>--debug</code></dt>
|
||
<dd>
|
||
<p>explain how a file is copied. Implies -v</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>explicitly state what is being done</p>
|
||
</dd>
|
||
<dt><code>--symbolic-link</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>make symbolic links instead of copying</p>
|
||
</dd>
|
||
<dt><code>--force</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>if an existing destination file cannot be opened, remove it and try again (this option is ignored when the -n option is also used). Currently not implemented for Windows.</p>
|
||
</dd>
|
||
<dt><code>--remove-destination</code></dt>
|
||
<dd>
|
||
<p>remove each existing destination file before attempting to open it (contrast with --force). On Windows, currently only works for writeable files.</p>
|
||
</dd>
|
||
<dt><code>--backup=<CONTROL></code></dt>
|
||
<dd>
|
||
<p>make a backup of each existing destination file</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>like --backup but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code>, <code>-S <SUFFIX></code></dt>
|
||
<dd>
|
||
<p>override the usual backup suffix</p>
|
||
</dd>
|
||
<dt><code>--update</code></dt>
|
||
<dd>
|
||
<p>move only when the SOURCE file is newer than the destination file or when the destination file is missing</p>
|
||
</dd>
|
||
<dt><code>-u</code></dt>
|
||
<dd>
|
||
<p>like --update but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>--reflink=<WHEN></code></dt>
|
||
<dd>
|
||
<p>control clone/CoW copies. See below</p>
|
||
</dd>
|
||
<dt><code>--attributes-only</code></dt>
|
||
<dd>
|
||
<p>Don't copy the file data, just the attributes</p>
|
||
</dd>
|
||
<dt><code>--preserve=<ATTR_LIST></code></dt>
|
||
<dd>
|
||
<p>Preserve the specified attributes (default: mode, ownership (unix only), timestamps), if possible additional attributes: context, links, xattr, all</p>
|
||
</dd>
|
||
<dt><code>--preserve-default-attributes</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>same as --preserve=mode,ownership(unix only),timestamps</p>
|
||
</dd>
|
||
<dt><code>--no-preserve=<ATTR_LIST></code></dt>
|
||
<dd>
|
||
<p>don't preserve the specified attributes</p>
|
||
</dd>
|
||
<dt><code>--parents</code></dt>
|
||
<dd>
|
||
<p>use full source file name under DIRECTORY</p>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>never follow symbolic links in SOURCE</p>
|
||
</dd>
|
||
<dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>always follow symbolic links in SOURCE</p>
|
||
</dd>
|
||
<dt><code>-H</code></dt>
|
||
<dd>
|
||
<p>follow command-line symbolic links in SOURCE</p>
|
||
</dd>
|
||
<dt><code>--archive</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Same as -dR --preserve=all</p>
|
||
</dd>
|
||
<dt><code>-d</code></dt>
|
||
<dd>
|
||
<p>same as --no-dereference --preserve=links</p>
|
||
</dd>
|
||
<dt><code>--one-file-system</code>, <code>-x</code></dt>
|
||
<dd>
|
||
<p>stay on this file system</p>
|
||
</dd>
|
||
<dt><code>--sparse=<WHEN></code></dt>
|
||
<dd>
|
||
<p>control creation of sparse files. See below</p>
|
||
</dd>
|
||
<dt><code>--copy-contents</code></dt>
|
||
<dd>
|
||
<p>NotImplemented: copy contents of special files when recursive</p>
|
||
</dd>
|
||
<dt><code>--context=<CTX></code></dt>
|
||
<dd>
|
||
<p>NotImplemented: set SELinux security context of destination file to default type</p>
|
||
</dd>
|
||
<dt><code>--progress</code>, <code>-g</code></dt>
|
||
<dd>
|
||
<p>Display a progress bar. <br />Note: this feature is not supported by GNU coreutils.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Do not copy a non-directory that has an existing destination with the same or newer modification timestamp;
|
||
instead, silently skip the file without failing. If timestamps are being preserved, the comparison is to the
|
||
source timestamp truncated to the resolutions of the destination file system and of the system calls used to
|
||
update timestamps; this avoids duplicate work if several <code>cp -pu</code> commands are executed with the same source
|
||
and destination. This option is ignored if the <code>-n</code> or <code>--no-clobber</code> option is also specified. Also, if
|
||
<code>--preserve=links</code> is also specified (like with <code>cp -au</code> for example), that will take precedence; consequently,
|
||
depending on the order that files are processed from the source, newer files in the destination may be replaced,
|
||
to mirror hard links in the source. which gives more control over which existing files in the destination are
|
||
replaced, and its value can be one of the following:</p>
|
||
<ul>
|
||
<li><code>all</code> This is the default operation when an <code>--update</code> option is not specified, and results in all existing files in the destination being replaced.</li>
|
||
<li><code>none</code> This is similar to the <code>--no-clobber</code> option, in that no files in the destination are replaced, but also skipping a file does not induce a failure.</li>
|
||
<li><code>older</code> This is the default operation when <code>--update</code> is specified, and results in files being replaced if they’re older than the corresponding source file.</li>
|
||
</ul>
|
||
<h2 id="examples-15"><a class="header" href="#examples-15">Examples</a></h2>
|
||
<p>Copy a file to another location:</p>
|
||
<pre><code class="language-shell">cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}
|
||
</code></pre>
|
||
<p>Copy a file into another directory, keeping the filename:</p>
|
||
<pre><code class="language-shell">cp {{path/to/source_file.ext}} {{path/to/target_parent_directory}}
|
||
</code></pre>
|
||
<p>Recursively copy a directory's contents to another location (if the destination exists, the directory is copied inside it):</p>
|
||
<pre><code class="language-shell">cp -R {{path/to/source_directory}} {{path/to/target_directory}}
|
||
</code></pre>
|
||
<p>Copy a directory recursively, in verbose mode (shows files as they are copied):</p>
|
||
<pre><code class="language-shell">cp -vR {{path/to/source_directory}} {{path/to/target_directory}}
|
||
</code></pre>
|
||
<p>Copy multiple files at once to a directory:</p>
|
||
<pre><code class="language-shell">cp -t {{path/to/destination_directory}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Copy text files to another location, in interactive mode (prompts user before overwriting):</p>
|
||
<pre><code class="language-shell">cp -i {{*.txt}} {{path/to/target_directory}}
|
||
</code></pre>
|
||
<p>Follow symbolic links before copying:</p>
|
||
<pre><code class="language-shell">cp -L {{link}} {{path/to/target_directory}}
|
||
</code></pre>
|
||
<p>Use the first argument as the destination directory (useful for <code>xargs ... | cp -t <DEST_DIR></code>):</p>
|
||
<pre><code class="language-shell">cp -t {{path/to/target_directory}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="csplit"><a class="header" href="#csplit">csplit</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>csplit [OPTION]... FILE PATTERN...
|
||
</code></pre>
|
||
<p>Split a file into sections determined by context lines</p>
|
||
<h2 id="options-16"><a class="header" href="#options-16">Options</a></h2>
|
||
<dl><dt><code>--suffix-format=<FORMAT></code>, <code>-b <FORMAT></code></dt>
|
||
<dd>
|
||
<p>use sprintf FORMAT instead of %02d</p>
|
||
</dd>
|
||
<dt><code>--prefix=<PREFIX></code>, <code>-f <PREFIX></code></dt>
|
||
<dd>
|
||
<p>use PREFIX instead of 'xx'</p>
|
||
</dd>
|
||
<dt><code>--keep-files</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>do not remove output files on errors</p>
|
||
</dd>
|
||
<dt><code>--suppress-matched</code></dt>
|
||
<dd>
|
||
<p>suppress the lines matching PATTERN</p>
|
||
</dd>
|
||
<dt><code>--digits=<DIGITS></code>, <code>-n <DIGITS></code></dt>
|
||
<dd>
|
||
<p>use specified number of digits instead of 2</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>--silent</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>do not print counts of output file sizes</p>
|
||
</dd>
|
||
<dt><code>--elide-empty-files</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>remove empty output files</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output.</p>
|
||
<h2 id="examples-16"><a class="header" href="#examples-16">Examples</a></h2>
|
||
<p>Split a file at lines 5 and 23:</p>
|
||
<pre><code class="language-shell">csplit {{path/to/file}} {{5}} {{23}}
|
||
</code></pre>
|
||
<p>Split a file every 5 lines (this will fail if the total number of lines is not divisible by 5):</p>
|
||
<pre><code class="language-shell">csplit {{path/to/file}} {{5}} {*}
|
||
</code></pre>
|
||
<p>Split a file every 5 lines, ignoring exact-division error:</p>
|
||
<pre><code class="language-shell">csplit -k {{path/to/file}} {{5}} {*}
|
||
</code></pre>
|
||
<p>Split a file at line 5 and use a custom prefix for the output files:</p>
|
||
<pre><code class="language-shell">csplit {{path/to/file}} {{5}} -f {{prefix}}
|
||
</code></pre>
|
||
<p>Split a file at a line matching a regular expression:</p>
|
||
<pre><code class="language-shell">csplit {{path/to/file}} /{{regular_expression}}/
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="cut-1"><a class="header" href="#cut-1">cut</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>cut [-d|-w] [-s] [-z] [--output-delimiter] ((-f|-b|-c) {{sequence}}) {{sourcefile}}+
|
||
</code></pre>
|
||
<p>Prints specified byte or field columns from each line of stdin or the input files</p>
|
||
<h2 id="options-17"><a class="header" href="#options-17">Options</a></h2>
|
||
<dl><dt><code>--bytes=<LIST></code>, <code>-b <LIST></code></dt>
|
||
<dd>
|
||
<p>filter byte columns from the input source</p>
|
||
</dd>
|
||
<dt><code>--characters=<LIST></code>, <code>-c <LIST></code></dt>
|
||
<dd>
|
||
<p>alias for character mode</p>
|
||
</dd>
|
||
<dt><code>--delimiter=<DELIM></code>, <code>-d <DELIM></code></dt>
|
||
<dd>
|
||
<p>specify the delimiter character that separates fields in the input source. Defaults to Tab.</p>
|
||
</dd>
|
||
<dt><code>-w <WHITESPACE></code></dt>
|
||
<dd>
|
||
<p>Use any number of whitespace (Space, Tab) to separate fields in the input source (FreeBSD extension).</p>
|
||
</dd>
|
||
<dt><code>--fields=<LIST></code>, <code>-f <LIST></code></dt>
|
||
<dd>
|
||
<p>filter field columns from the input source</p>
|
||
</dd>
|
||
<dt><code>--complement</code></dt>
|
||
<dd>
|
||
<p>invert the filter - instead of displaying only the filtered columns, display all but those columns</p>
|
||
</dd>
|
||
<dt><code>--only-delimited</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>in field mode, only print lines which contain the delimiter</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>instead of filtering columns based on line, filter columns based on \0 (NULL character)</p>
|
||
</dd>
|
||
<dt><code>--output-delimiter=<NEW_DELIM></code></dt>
|
||
<dd>
|
||
<p>in field mode, replace the delimiter in output lines with this option's argument</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Each call must specify a mode (what to use for columns),
|
||
a sequence (which columns to print), and provide a data source</p>
|
||
<h3 id="specifying-a-mode"><a class="header" href="#specifying-a-mode">Specifying a mode</a></h3>
|
||
<p>Use <code>--bytes</code> (<code>-b</code>) or <code>--characters</code> (<code>-c</code>) to specify byte mode</p>
|
||
<p>Use <code>--fields</code> (<code>-f</code>) to specify field mode, where each line is broken into
|
||
fields identified by a delimiter character. For example for a typical CSV
|
||
you could use this in combination with setting comma as the delimiter</p>
|
||
<h3 id="specifying-a-sequence"><a class="header" href="#specifying-a-sequence">Specifying a sequence</a></h3>
|
||
<p>A sequence is a group of 1 or more numbers or inclusive ranges separated
|
||
by a commas.</p>
|
||
<pre><code>cut -f 2,5-7 some_file.txt
|
||
</code></pre>
|
||
<p>will display the 2nd, 5th, 6th, and 7th field for each source line</p>
|
||
<p>Ranges can extend to the end of the row by excluding the second number</p>
|
||
<pre><code>cut -f 3- some_file.txt
|
||
</code></pre>
|
||
<p>will display the 3rd field and all fields after for each source line</p>
|
||
<p>The first number of a range can be excluded, and this is effectively the
|
||
same as using 1 as the first number: it causes the range to begin at the
|
||
first column. Ranges can also display a single column</p>
|
||
<pre><code>cut -f 1,3-5 some_file.txt
|
||
</code></pre>
|
||
<p>will display the 1st, 3rd, 4th, and 5th field for each source line</p>
|
||
<p>The <code>--complement</code> option, when used, inverts the effect of the sequence</p>
|
||
<pre><code>cut --complement -f 4-6 some_file.txt
|
||
</code></pre>
|
||
<p>will display the every field but the 4th, 5th, and 6th</p>
|
||
<h3 id="specifying-a-data-source"><a class="header" href="#specifying-a-data-source">Specifying a data source</a></h3>
|
||
<p>If no <code>sourcefile</code> arguments are specified, stdin is used as the source of
|
||
lines to print</p>
|
||
<p>If <code>sourcefile</code> arguments are specified, stdin is ignored and all files are
|
||
read in consecutively if a <code>sourcefile</code> is not successfully read, a warning
|
||
will print to stderr, and the eventual status code will be 1, but cut
|
||
will continue to read through proceeding <code>sourcefiles</code></p>
|
||
<p>To print columns from both STDIN and a file argument, use <code>-</code> (dash) as a
|
||
<code>sourcefile</code> argument to represent stdin.</p>
|
||
<h3 id="field-mode-options"><a class="header" href="#field-mode-options">Field Mode options</a></h3>
|
||
<p>The fields in each line are identified by a delimiter (separator)</p>
|
||
<h4 id="set-the-delimiter"><a class="header" href="#set-the-delimiter">Set the delimiter</a></h4>
|
||
<p>Set the delimiter which separates fields in the file using the
|
||
<code>--delimiter</code> (<code>-d</code>) option. Setting the delimiter is optional.
|
||
If not set, a default delimiter of Tab will be used.</p>
|
||
<p>If the <code>-w</code> option is provided, fields will be separated by any number
|
||
of whitespace characters (Space and Tab). The output delimiter will
|
||
be a Tab unless explicitly specified. Only one of <code>-d</code> or <code>-w</code> option can be specified.
|
||
This is an extension adopted from FreeBSD.</p>
|
||
<h4 id="optionally-filter-based-on-delimiter"><a class="header" href="#optionally-filter-based-on-delimiter">Optionally Filter based on delimiter</a></h4>
|
||
<p>If the <code>--only-delimited</code> (<code>-s</code>) flag is provided, only lines which
|
||
contain the delimiter will be printed</p>
|
||
<h4 id="replace-the-delimiter"><a class="header" href="#replace-the-delimiter">Replace the delimiter</a></h4>
|
||
<p>If the <code>--output-delimiter</code> option is provided, the argument used for
|
||
it will replace the delimiter character in each line printed. This is
|
||
useful for transforming tabular data - e.g. to convert a CSV to a
|
||
TSV (tab-separated file)</p>
|
||
<h3 id="line-endings"><a class="header" href="#line-endings">Line endings</a></h3>
|
||
<p>When the <code>--zero-terminated</code> (<code>-z</code>) option is used, cut sees \0 (null) as the
|
||
'line ending' character (both for the purposes of reading lines and
|
||
separating printed lines) instead of \n (newline). This is useful for
|
||
tabular data where some of the cells may contain newlines</p>
|
||
<pre><code>echo 'ab\\0cd' | cut -z -c 1
|
||
</code></pre>
|
||
<p>will result in 'a\0c\0'</p>
|
||
<h2 id="examples-17"><a class="header" href="#examples-17">Examples</a></h2>
|
||
<p>Print a specific character/field range of each line:</p>
|
||
<pre><code class="language-shell">{{command}} | cut --{{characters|fields}}={{1|1,10|1-10|1-|-10}}
|
||
</code></pre>
|
||
<p>Print a range of each line with a specific delimiter:</p>
|
||
<pre><code class="language-shell">{{command}} | cut --delimiter="{{,}}" --{{fields}}={{1}}
|
||
</code></pre>
|
||
<p>Print a range of each line of the specific file:</p>
|
||
<pre><code class="language-shell">cut --{{characters}}={{1}} {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="date"><a class="header" href="#date">date</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>date [OPTION]... [+FORMAT]...
|
||
date [OPTION]... [MMDDhhmm[[CC]YY][.ss]]
|
||
</code></pre>
|
||
<p>Print or set the system date and time</p>
|
||
<h2 id="options-18"><a class="header" href="#options-18">Options</a></h2>
|
||
<dl><dt><code>--date=<STRING></code>, <code>-d <STRING></code></dt>
|
||
<dd>
|
||
<p>display time described by STRING, not 'now'</p>
|
||
</dd>
|
||
<dt><code>--file=<DATEFILE></code>, <code>-f <DATEFILE></code></dt>
|
||
<dd>
|
||
<p>like --date; once for each line of DATEFILE</p>
|
||
</dd>
|
||
<dt><code>--iso-8601=<FMT></code>, <code>-I <FMT></code></dt>
|
||
<dd>
|
||
<p>output date/time in ISO 8601 format.<br /> FMT='date' for date only (the default),<br /> 'hours', 'minutes', 'seconds', or 'ns'<br /> for date and time to the indicated precision.<br /> Example: 2006-08-14T02:34:56-06:00</p>
|
||
</dd>
|
||
<dt><code>--rfc-email</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>output date and time in RFC 5322 format.<br /> Example: Mon, 14 Aug 2006 02:34:56 -0600</p>
|
||
</dd>
|
||
<dt><code>--rfc-3339=<FMT></code></dt>
|
||
<dd>
|
||
<p>output date/time in RFC 3339 format.<br /> FMT='date', 'seconds', or 'ns'<br /> for date and time to the indicated precision.<br /> Example: 2006-08-14 02:34:56-06:00</p>
|
||
</dd>
|
||
<dt><code>--debug</code></dt>
|
||
<dd>
|
||
<p>annotate the parsed date, and warn about questionable usage to stderr</p>
|
||
</dd>
|
||
<dt><code>--reference=<FILE></code>, <code>-r <FILE></code></dt>
|
||
<dd>
|
||
<p>display the last modification time of FILE</p>
|
||
</dd>
|
||
<dt><code>--set=<STRING></code>, <code>-s <STRING></code></dt>
|
||
<dd>
|
||
<p>set time described by STRING</p>
|
||
</dd>
|
||
<dt><code>--universal</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>print or set Coordinated Universal Time (UTC)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-18"><a class="header" href="#examples-18">Examples</a></h2>
|
||
<p>Display the current date using the default locale's format:</p>
|
||
<pre><code class="language-shell">date +%c
|
||
</code></pre>
|
||
<p>Display the current date in UTC, using the ISO 8601 format:</p>
|
||
<pre><code class="language-shell">date -u +%Y-%m-%dT%H:%M:%S%Z
|
||
</code></pre>
|
||
<p>Display the current date as a Unix timestamp (seconds since the Unix epoch):</p>
|
||
<pre><code class="language-shell">date +%s
|
||
</code></pre>
|
||
<p>Convert a date specified as a Unix timestamp to the default format:</p>
|
||
<pre><code class="language-shell">date -d @{{1473305798}}
|
||
</code></pre>
|
||
<p>Convert a given date to the Unix timestamp format:</p>
|
||
<pre><code class="language-shell">date -d "{{2018-09-01 00:00}}" +%s --utc
|
||
</code></pre>
|
||
<p>Display the current date using the RFC-3339 format (<code>YYYY-MM-DD hh:mm:ss TZ</code>):</p>
|
||
<pre><code class="language-shell">date --rfc-3339=s
|
||
</code></pre>
|
||
<p>Set the current date using the format <code>MMDDhhmmYYYY.ss</code> (<code>YYYY</code> and <code>.ss</code> are optional):</p>
|
||
<pre><code class="language-shell">date {{093023592021.59}}
|
||
</code></pre>
|
||
<p>Display the current ISO week number:</p>
|
||
<pre><code class="language-shell">date +%V
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="dd"><a class="header" href="#dd">dd</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>dd [OPERAND]...
|
||
dd OPTION
|
||
</code></pre>
|
||
<p>Copy, and optionally convert, a file system resource</p>
|
||
<h2 id="options-19"><a class="header" href="#options-19">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h3 id="operands"><a class="header" href="#operands">Operands</a></h3>
|
||
<ul>
|
||
<li>
|
||
<p><code>Bs=BYTES</code> : read and write up to BYTES bytes at a time (default: 512);
|
||
overwrites <code>ibs</code> and <code>obs</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>cbs=BYTES</code> : the 'conversion block size' in bytes. Applies to the
|
||
<code>conv=block</code>, and <code>conv=unblock</code> operations.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>conv=CONVS</code> : a comma-separated list of conversion options or (for legacy
|
||
reasons) file flags.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>count=N</code> : stop reading input after N ibs-sized read operations rather
|
||
than proceeding until EOF. See <code>iflag=count_bytes</code> if stopping after N bytes
|
||
is preferred</p>
|
||
</li>
|
||
<li>
|
||
<p><code>ibs=N</code> : the size of buffer used for reads (default: 512)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>if=FILE</code> : the file used for input. When not specified, stdin is used instead</p>
|
||
</li>
|
||
<li>
|
||
<p><code>iflag=FLAGS</code> : a comma-separated list of input flags which specify how the
|
||
input source is treated. FLAGS may be any of the input-flags or general-flags
|
||
specified below.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>skip=N</code> (or <code>iseek=N</code>) : skip N ibs-sized records into input before beginning
|
||
copy/convert operations. See iflag=seek_bytes if seeking N bytes is preferred.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>obs=N</code> : the size of buffer used for writes (default: 512)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>of=FILE</code> : the file used for output. When not specified, stdout is used
|
||
instead</p>
|
||
</li>
|
||
<li>
|
||
<p><code>oflag=FLAGS</code> : comma separated list of output flags which specify how the
|
||
output source is treated. FLAGS may be any of the output flags or general
|
||
flags specified below</p>
|
||
</li>
|
||
<li>
|
||
<p><code>seek=N</code> (or <code>oseek=N</code>) : seeks N obs-sized records into output before
|
||
beginning copy/convert operations. See oflag=seek_bytes if seeking N bytes is
|
||
preferred</p>
|
||
</li>
|
||
<li>
|
||
<p><code>status=LEVEL</code> : controls whether volume and performance stats are written to
|
||
stderr.</p>
|
||
<p>When unspecified, dd will print stats upon completion. An example is below.</p>
|
||
<pre><code class="language-plain"> 6+0 records in
|
||
16+0 records out
|
||
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.00057009 s,
|
||
14.4 MB/s
|
||
</code></pre>
|
||
<p>The first two lines are the 'volume' stats and the final line is the
|
||
'performance' stats.
|
||
The volume stats indicate the number of complete and partial ibs-sized reads,
|
||
or obs-sized writes that took place during the copy. The format of the volume
|
||
stats is <code><complete>+<partial></code>. If records have been truncated (see
|
||
<code>conv=block</code>), the volume stats will contain the number of truncated records.</p>
|
||
<p>Possible LEVEL values are:</p>
|
||
<ul>
|
||
<li><code>progress</code> : Print periodic performance stats as the copy proceeds.</li>
|
||
<li><code>noxfer</code> : Print final volume stats, but not performance stats.</li>
|
||
<li><code>none</code> : Do not print any stats.</li>
|
||
</ul>
|
||
<p>Printing performance stats is also triggered by the INFO signal (where supported),
|
||
or the USR1 signal. Setting the POSIXLY_CORRECT environment variable to any value
|
||
(including an empty value) will cause the USR1 signal to be ignored.</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="conversion-options"><a class="header" href="#conversion-options">Conversion Options</a></h3>
|
||
<ul>
|
||
<li>
|
||
<p><code>ascii</code> : convert from EBCDIC to ASCII. This is the inverse of the <code>ebcdic</code>
|
||
option. Implies <code>conv=unblock</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>ebcdic</code> : convert from ASCII to EBCDIC. This is the inverse of the <code>ascii</code>
|
||
option. Implies <code>conv=block</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>ibm</code> : convert from ASCII to EBCDIC, applying the conventions for <code>[</code>, <code>]</code>
|
||
and <code>~</code> specified in POSIX. Implies <code>conv=block</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>ucase</code> : convert from lower-case to upper-case.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>lcase</code> : converts from upper-case to lower-case.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>block</code> : for each newline less than the size indicated by cbs=BYTES, remove
|
||
the newline and pad with spaces up to cbs. Lines longer than cbs are truncated.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>unblock</code> : for each block of input of the size indicated by cbs=BYTES, remove
|
||
right-trailing spaces and replace with a newline character.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>sparse</code> : attempts to seek the output when an obs-sized block consists of
|
||
only zeros.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>swab</code> : swaps each adjacent pair of bytes. If an odd number of bytes is
|
||
present, the final byte is omitted.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>sync</code> : pad each ibs-sided block with zeros. If <code>block</code> or <code>unblock</code> is
|
||
specified, pad with spaces instead.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>excl</code> : the output file must be created. Fail if the output file is already
|
||
present.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>nocreat</code> : the output file will not be created. Fail if the output file in
|
||
not already present.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>notrunc</code> : the output file will not be truncated. If this option is not
|
||
present, output will be truncated when opened.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>noerror</code> : all read errors will be ignored. If this option is not present,
|
||
dd will only ignore Error::Interrupted.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>fdatasync</code> : data will be written before finishing.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>fsync</code> : data and metadata will be written before finishing.</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="input-flags"><a class="header" href="#input-flags">Input flags</a></h3>
|
||
<ul>
|
||
<li><code>count_bytes</code> : a value to <code>count=N</code> will be interpreted as bytes.</li>
|
||
<li><code>skip_bytes</code> : a value to <code>skip=N</code> will be interpreted as bytes.</li>
|
||
<li><code>fullblock</code> : wait for ibs bytes from each read. zero-length reads are still
|
||
considered EOF.</li>
|
||
</ul>
|
||
<h3 id="output-flags"><a class="header" href="#output-flags">Output flags</a></h3>
|
||
<ul>
|
||
<li><code>append</code> : open file in append mode. Consider setting conv=notrunc as well.</li>
|
||
<li><code>seek_bytes</code> : a value to seek=N will be interpreted as bytes.</li>
|
||
</ul>
|
||
<h3 id="general-flags"><a class="header" href="#general-flags">General Flags</a></h3>
|
||
<ul>
|
||
<li><code>Direct</code> : use direct I/O for data.</li>
|
||
<li><code>directory</code> : fail unless the given input (if used as an iflag) or
|
||
output (if used as an oflag) is a directory.</li>
|
||
<li><code>dsync</code> : use synchronized I/O for data.</li>
|
||
<li><code>sync</code> : use synchronized I/O for data and metadata.</li>
|
||
<li><code>nonblock</code> : use non-blocking I/O.</li>
|
||
<li><code>noatime</code> : do not update access time.</li>
|
||
<li><code>nocache</code> : request that OS drop cache.</li>
|
||
<li><code>noctty</code> : do not assign a controlling tty.</li>
|
||
<li><code>nofollow</code> : do not follow system links.</li>
|
||
</ul>
|
||
<h2 id="examples-19"><a class="header" href="#examples-19">Examples</a></h2>
|
||
<p>Make a bootable USB drive from an isohybrid file (such like <code>archlinux-xxx.iso</code>):</p>
|
||
<pre><code class="language-shell">dd if={{path/to/file.iso}} of=/dev/{{usb_drive}}
|
||
</code></pre>
|
||
<p>Clone a drive to another drive with 4 MiB block and ignore error:</p>
|
||
<pre><code class="language-shell">dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs={{4194304}} conv={{noerror}}
|
||
</code></pre>
|
||
<p>Generate a file of 100 random bytes by using kernel random driver:</p>
|
||
<pre><code class="language-shell">dd if=/dev/urandom of={{path/to/random_file}} bs={{100}} count={{1}}
|
||
</code></pre>
|
||
<p>Benchmark the write performance of a disk:</p>
|
||
<pre><code class="language-shell">dd if=/dev/zero of={{path/to/file_1GB}} bs={{1024}} count={{1000000}}
|
||
</code></pre>
|
||
<p>Generate a system backup into an IMG file:</p>
|
||
<pre><code class="language-shell">dd if={{/dev/drive_device}} of={{path/to/file.img}}
|
||
</code></pre>
|
||
<p>Restore a drive from an IMG file:</p>
|
||
<pre><code class="language-shell">dd if={{path/to/file.img}} of={{/dev/drive_device}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="df"><a class="header" href="#df">df</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>df [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Show information about the file system on which each FILE resides,
|
||
or all file systems by default.</p>
|
||
<h2 id="options-20"><a class="header" href="#options-20">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>include dummy file systems</p>
|
||
</dd>
|
||
<dt><code>--block-size=<SIZE></code>, <code>-B <SIZE></code></dt>
|
||
<dd>
|
||
<p>scale sizes by SIZE before printing them; e.g.'-BM' prints sizes in units of 1,048,576 bytes</p>
|
||
</dd>
|
||
<dt><code>--total</code></dt>
|
||
<dd>
|
||
<p>produce a grand total</p>
|
||
</dd>
|
||
<dt><code>--human-readable</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>print sizes in human readable format (e.g., 1K 234M 2G)</p>
|
||
</dd>
|
||
<dt><code>--si</code>, <code>-H</code></dt>
|
||
<dd>
|
||
<p>likewise, but use powers of 1000 not 1024</p>
|
||
</dd>
|
||
<dt><code>--inodes</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>list inode information instead of block usage</p>
|
||
</dd>
|
||
<dt><code>-k</code></dt>
|
||
<dd>
|
||
<p>like --block-size=1K</p>
|
||
</dd>
|
||
<dt><code>--local</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>limit listing to local file systems</p>
|
||
</dd>
|
||
<dt><code>--no-sync</code></dt>
|
||
<dd>
|
||
<p>do not invoke sync before getting usage info (default)</p>
|
||
</dd>
|
||
<dt><code>--output=<FIELD_LIST></code></dt>
|
||
<dd>
|
||
<p>use the output format defined by FIELD_LIST, or print all fields if FIELD_LIST is omitted.</p>
|
||
</dd>
|
||
<dt><code>--portability</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>use the POSIX output format</p>
|
||
</dd>
|
||
<dt><code>--sync</code></dt>
|
||
<dd>
|
||
<p>invoke sync before getting usage info (non-windows only)</p>
|
||
</dd>
|
||
<dt><code>--type=<TYPE></code>, <code>-t <TYPE></code></dt>
|
||
<dd>
|
||
<p>limit listing to file systems of type TYPE</p>
|
||
</dd>
|
||
<dt><code>--print-type</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>print file system type</p>
|
||
</dd>
|
||
<dt><code>--exclude-type=<TYPE></code>, <code>-x <TYPE></code></dt>
|
||
<dd>
|
||
<p>limit listing to file systems not of type TYPE</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Display values are in units of the first available SIZE from --block-size,
|
||
and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
|
||
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).</p>
|
||
<p>SIZE is an integer and optional unit (example: 10M is 10<em>1024</em>1024).
|
||
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers
|
||
of 1000).</p>
|
||
<h2 id="examples-20"><a class="header" href="#examples-20">Examples</a></h2>
|
||
<p>Display all filesystems and their disk usage:</p>
|
||
<pre><code class="language-shell">df
|
||
</code></pre>
|
||
<p>Display all filesystems and their disk usage in human-readable form:</p>
|
||
<pre><code class="language-shell">df -h
|
||
</code></pre>
|
||
<p>Display the filesystem and its disk usage containing the given file or directory:</p>
|
||
<pre><code class="language-shell">df {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Display statistics on the number of free inodes:</p>
|
||
<pre><code class="language-shell">df -i
|
||
</code></pre>
|
||
<p>Display filesystems but exclude the specified types:</p>
|
||
<pre><code class="language-shell">df -x {{squashfs}} -x {{tmpfs}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="dir"><a class="header" href="#dir">dir</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-21"><a class="header" href="#options-21">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--format</code></dt>
|
||
<dd>
|
||
<p>Set the display format.</p>
|
||
</dd>
|
||
<dt><code>-C</code></dt>
|
||
<dd>
|
||
<p>Display the files in columns.</p>
|
||
</dd>
|
||
<dt><code>--long</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>Display detailed information.</p>
|
||
</dd>
|
||
<dt><code>-x</code></dt>
|
||
<dd>
|
||
<p>List entries in rows instead of in columns.</p>
|
||
</dd>
|
||
<dt><code>--tabsize=<COLS></code>, <code>-T <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume tab stops at each COLS instead of 8 (unimplemented)</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>List entries separated by commas.</p>
|
||
</dd>
|
||
<dt><code>--zero</code></dt>
|
||
<dd>
|
||
<p>List entries separated by ASCII NUL characters.</p>
|
||
</dd>
|
||
<dt><code>--dired</code>, <code>-D</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-1</code></dt>
|
||
<dd>
|
||
<p>List one file per line.</p>
|
||
</dd>
|
||
<dt><code>-o</code></dt>
|
||
<dd>
|
||
<p>Long format without group information. Identical to --format=long with --no-group.</p>
|
||
</dd>
|
||
<dt><code>-g</code></dt>
|
||
<dd>
|
||
<p>Long format without owner information.</p>
|
||
</dd>
|
||
<dt><code>--numeric-uid-gid</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>-l with numeric UIDs and GIDs.</p>
|
||
</dd>
|
||
<dt><code>--quoting-style</code></dt>
|
||
<dd>
|
||
<p>Set quoting style.</p>
|
||
</dd>
|
||
<dt><code>--literal</code>, <code>-N</code></dt>
|
||
<dd>
|
||
<p>Use literal quoting style. Equivalent to <code>--quoting-style=literal</code></p>
|
||
</dd>
|
||
<dt><code>--escape</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>Use escape quoting style. Equivalent to <code>--quoting-style=escape</code></p>
|
||
</dd>
|
||
<dt><code>--quote-name</code>, <code>-Q</code></dt>
|
||
<dd>
|
||
<p>Use C quoting style. Equivalent to <code>--quoting-style=c</code></p>
|
||
</dd>
|
||
<dt><code>--hide-control-chars</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Replace control characters with '?' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--show-control-chars</code></dt>
|
||
<dd>
|
||
<p>Show control characters 'as is' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--time=<field></code></dt>
|
||
<dd>
|
||
<p>Show time in <field>:<br /> access time (-u): atime, access, use;<br /> change time (-t): ctime, status.<br /> birth time: birth, creation;</p>
|
||
</dd>
|
||
<dt><code>-c</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status change time (the 'ctime' in the inode) instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the status change time.</p>
|
||
</dd>
|
||
<dt><code>-u</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status access time instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the access time.</p>
|
||
</dd>
|
||
<dt><code>--hide=<PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN (overridden by -a or -A)</p>
|
||
</dd>
|
||
<dt><code>--ignore=<PATTERN></code>, <code>-I <PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN</p>
|
||
</dd>
|
||
<dt><code>--ignore-backups</code>, <code>-B</code></dt>
|
||
<dd>
|
||
<p>Ignore entries which end with ~.</p>
|
||
</dd>
|
||
<dt><code>--sort=<field></code></dt>
|
||
<dd>
|
||
<p>Sort by <field>: name, none (-U), time (-t), size (-S), extension (-X) or width</p>
|
||
</dd>
|
||
<dt><code>-S</code></dt>
|
||
<dd>
|
||
<p>Sort by file size, largest first.</p>
|
||
</dd>
|
||
<dt><code>-t</code></dt>
|
||
<dd>
|
||
<p>Sort by modification time (the 'mtime' in the inode), newest first.</p>
|
||
</dd>
|
||
<dt><code>-v</code></dt>
|
||
<dd>
|
||
<p>Natural sort of (version) numbers in the filenames.</p>
|
||
</dd>
|
||
<dt><code>-X</code></dt>
|
||
<dd>
|
||
<p>Sort alphabetically by entry extension.</p>
|
||
</dd>
|
||
<dt><code>-U</code></dt>
|
||
<dd>
|
||
<p>Do not sort; list the files in whatever order they are stored in the directory. This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster.</p>
|
||
</dd>
|
||
<dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>When showing file information for a symbolic link, show information for the file the link references rather than the link itself.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line-symlink-to-dir</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when they link to directories and are given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line</code>, <code>-H</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--no-group</code>, <code>-G</code></dt>
|
||
<dd>
|
||
<p>Do not show group in long format.</p>
|
||
</dd>
|
||
<dt><code>--author</code></dt>
|
||
<dd>
|
||
<p>Show author in long format. On the supported platforms, the author always matches the file owner.</p>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Do not ignore hidden files (files with names that start with '.').</p>
|
||
</dd>
|
||
<dt><code>--almost-all</code>, <code>-A</code></dt>
|
||
<dd>
|
||
<p>In a directory, do not ignore all file names that start with '.', only ignore '.' and '..'.</p>
|
||
</dd>
|
||
<dt><code>--directory</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Only list the names of directories, rather than listing directory contents. This will not follow symbolic links unless one of <code>--dereference-command-line (-H)</code>, <code>--dereference (-L)</code>, or <code>--dereference-command-line-symlink-to-dir</code> is specified.</p>
|
||
</dd>
|
||
<dt><code>--human-readable</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes (e.g. 1K 234M 56G).</p>
|
||
</dd>
|
||
<dt><code>--kibibytes</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>default to 1024-byte blocks for file system usage; used only with -s and per directory totals</p>
|
||
</dd>
|
||
<dt><code>--si</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes using powers of 1000 instead of 1024.</p>
|
||
</dd>
|
||
<dt><code>--block-size=<BLOCK_SIZE></code></dt>
|
||
<dd>
|
||
<p>scale sizes by BLOCK_SIZE when printing them</p>
|
||
</dd>
|
||
<dt><code>--inode</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>print the index number of each file</p>
|
||
</dd>
|
||
<dt><code>--reverse</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>Reverse whatever the sorting method is e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>List the contents of all directories recursively.</p>
|
||
</dd>
|
||
<dt><code>--width=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume that the terminal is COLS columns wide.</p>
|
||
</dd>
|
||
<dt><code>--size</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print the allocated size of each file, in blocks</p>
|
||
</dd>
|
||
<dt><code>--color</code></dt>
|
||
<dd>
|
||
<p>Color output based on file type.</p>
|
||
</dd>
|
||
<dt><code>--indicator-style</code></dt>
|
||
<dd>
|
||
<p>Append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)</p>
|
||
</dd>
|
||
<dt><code>--classify=<when></code>, <code>-F <when></code></dt>
|
||
<dd>
|
||
<p>Append a character to each file name indicating the file type. Also, for regular files that are executable, append '*'. The file type indicators are '/' for directories, '@' for symbolic links, '|' for FIFOs, '=' for sockets, '>' for doors, and nothing for regular files. when may be omitted, or one of:<br /> none - Do not classify. This is the default.<br /> auto - Only classify if standard output is a terminal.<br /> always - Always classify.<br />Specifying --classify and no when is equivalent to --classify=always. This will not follow symbolic links listed on the command line unless the --dereference-command-line (-H), --dereference (-L), or --dereference-command-line-symlink-to-dir options are specified.</p>
|
||
</dd>
|
||
<dt><code>--file-type</code></dt>
|
||
<dd>
|
||
<p>Same as --classify, but do not append '*'</p>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>Append / indicator to directories.</p>
|
||
</dd>
|
||
<dt><code>--time-style=<TIME_STYLE></code></dt>
|
||
<dd>
|
||
<p>time/date format with -l; see TIME_STYLE below</p>
|
||
</dd>
|
||
<dt><code>--full-time</code></dt>
|
||
<dd>
|
||
<p>like -l --time-style=full-iso</p>
|
||
</dd>
|
||
<dt><code>--context</code>, <code>-Z</code></dt>
|
||
<dd>
|
||
<p>print any security context of each file</p>
|
||
</dd>
|
||
<dt><code>--group-directories-first</code></dt>
|
||
<dd>
|
||
<p>group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-21"><a class="header" href="#examples-21">Examples</a></h2>
|
||
<p>List all files, including hidden files:</p>
|
||
<pre><code class="language-shell">dir -all
|
||
</code></pre>
|
||
<p>List files including their author (<code>-l</code> is required):</p>
|
||
<pre><code class="language-shell">dir -l --author
|
||
</code></pre>
|
||
<p>List files excluding those that match a specified blob pattern:</p>
|
||
<pre><code class="language-shell">dir --hide={{pattern}}
|
||
</code></pre>
|
||
<p>List subdirectories recursively:</p>
|
||
<pre><code class="language-shell">dir --recursive
|
||
</code></pre>
|
||
<p>Display help:</p>
|
||
<pre><code class="language-shell">dir --help
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="dircolors"><a class="header" href="#dircolors">dircolors</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>dircolors [OPTION]... [FILE]
|
||
</code></pre>
|
||
<p>Output commands to set the LS_COLORS environment variable.</p>
|
||
<h2 id="options-22"><a class="header" href="#options-22">Options</a></h2>
|
||
<dl><dt><code>--sh</code>, <code>--bourne-shell</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>output Bourne shell code to set LS_COLORS</p>
|
||
</dd>
|
||
<dt><code>--csh</code>, <code>--c-shell</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>output C shell code to set LS_COLORS</p>
|
||
</dd>
|
||
<dt><code>--print-database</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>print the byte counts</p>
|
||
</dd>
|
||
<dt><code>--print-ls-colors</code></dt>
|
||
<dd>
|
||
<p>output fully escaped colors for display</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>If FILE is specified, read it to determine which colors to use for which
|
||
file types and extensions. Otherwise, a precompiled database is used.
|
||
For details on the format of these files, run 'dircolors --print-database'</p>
|
||
<h2 id="examples-22"><a class="header" href="#examples-22">Examples</a></h2>
|
||
<p>Output commands to set LS_COLOR using default colors:</p>
|
||
<pre><code class="language-shell">dircolors
|
||
</code></pre>
|
||
<p>Output commands to set LS_COLOR using colors from a file:</p>
|
||
<pre><code class="language-shell">dircolors {{path/to/file}}
|
||
</code></pre>
|
||
<p>Output commands for Bourne shell:</p>
|
||
<pre><code class="language-shell">dircolors --bourne-shell
|
||
</code></pre>
|
||
<p>Output commands for C shell:</p>
|
||
<pre><code class="language-shell">dircolors --c-shell
|
||
</code></pre>
|
||
<p>View the default colors for file types and extensions:</p>
|
||
<pre><code class="language-shell">dircolors --print-data
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="dirname"><a class="header" href="#dirname">dirname</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>dirname [OPTION] NAME...
|
||
</code></pre>
|
||
<p>Strip last component from file name</p>
|
||
<h2 id="options-23"><a class="header" href="#options-23">Options</a></h2>
|
||
<dl><dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>separate output with NUL rather than newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Output each NAME with its last non-slash component and trailing slashes
|
||
removed; if NAME contains no /'s, output '.' (meaning the current directory).</p>
|
||
<h2 id="examples-23"><a class="header" href="#examples-23">Examples</a></h2>
|
||
<p>Calculate the parent directory of a given path:</p>
|
||
<pre><code class="language-shell">dirname {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Calculate the parent directory of multiple paths:</p>
|
||
<pre><code class="language-shell">dirname {{path/to/file_a}} {{path/to/directory_b}}
|
||
</code></pre>
|
||
<p>Delimit output with a NUL character instead of a newline (useful when combining with <code>xargs</code>):</p>
|
||
<pre><code class="language-shell">dirname --zero {{path/to/directory_a}} {{path/to/file_b}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="du"><a class="header" href="#du">du</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>du [OPTION]... [FILE]...
|
||
du [OPTION]... --files0-from=F
|
||
</code></pre>
|
||
<p>Estimate file space usage</p>
|
||
<h2 id="options-24"><a class="header" href="#options-24">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>write counts for all files, not just directories</p>
|
||
</dd>
|
||
<dt><code>--apparent-size</code></dt>
|
||
<dd>
|
||
<p>print apparent sizes, rather than disk usage although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the like</p>
|
||
</dd>
|
||
<dt><code>--block-size=<SIZE></code>, <code>-B <SIZE></code></dt>
|
||
<dd>
|
||
<p>scale sizes by SIZE before printing them. E.g., '-BM' prints sizes in units of 1,048,576 bytes. See SIZE format below.</p>
|
||
</dd>
|
||
<dt><code>--bytes</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>equivalent to '--apparent-size --block-size=1'</p>
|
||
</dd>
|
||
<dt><code>--total</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>produce a grand total</p>
|
||
</dd>
|
||
<dt><code>--max-depth=<N></code>, <code>-d <N></code></dt>
|
||
<dd>
|
||
<p>print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize</p>
|
||
</dd>
|
||
<dt><code>--human-readable</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>print sizes in human readable format (e.g., 1K 234M 2G)</p>
|
||
</dd>
|
||
<dt><code>--inodes</code></dt>
|
||
<dd>
|
||
<p>list inode usage information instead of block usage like --block-size=1K</p>
|
||
</dd>
|
||
<dt><code>-k</code></dt>
|
||
<dd>
|
||
<p>like --block-size=1K</p>
|
||
</dd>
|
||
<dt><code>--count-links</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>count sizes many times if hard linked</p>
|
||
</dd>
|
||
<dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>follow all symbolic links</p>
|
||
</dd>
|
||
<dt><code>--dereference-args</code>, <code>-D</code></dt>
|
||
<dd>
|
||
<p>follow only symlinks that are listed on the command line</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>like --block-size=1M</p>
|
||
</dd>
|
||
<dt><code>--null</code>, <code>-0</code></dt>
|
||
<dd>
|
||
<p>end each output line with 0 byte rather than newline</p>
|
||
</dd>
|
||
<dt><code>--separate-dirs</code>, <code>-S</code></dt>
|
||
<dd>
|
||
<p>do not include size of subdirectories</p>
|
||
</dd>
|
||
<dt><code>--summarize</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>display only a total for each argument</p>
|
||
</dd>
|
||
<dt><code>--si</code></dt>
|
||
<dd>
|
||
<p>like -h, but use powers of 1000 not 1024</p>
|
||
</dd>
|
||
<dt><code>--one-file-system</code>, <code>-x</code></dt>
|
||
<dd>
|
||
<p>skip directories on different file systems</p>
|
||
</dd>
|
||
<dt><code>--threshold=<SIZE></code>, <code>-t <SIZE></code></dt>
|
||
<dd>
|
||
<p>exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>verbose mode (option not present in GNU/Coreutils)</p>
|
||
</dd>
|
||
<dt><code>--exclude=<PATTERN></code></dt>
|
||
<dd>
|
||
<p>exclude files that match PATTERN</p>
|
||
</dd>
|
||
<dt><code>--exclude-from=<FILE></code>, <code>-X <FILE></code></dt>
|
||
<dd>
|
||
<p>exclude files that match any pattern in FILE</p>
|
||
</dd>
|
||
<dt><code>--time=<WORD></code></dt>
|
||
<dd>
|
||
<p>show time of the last modification of any file in the directory, or any of its subdirectories. If WORD is given, show time as WORD instead of modification time: atime, access, use, ctime, status, birth or creation</p>
|
||
</dd>
|
||
<dt><code>--time-style=<STYLE></code></dt>
|
||
<dd>
|
||
<p>show times using style STYLE: full-iso, long-iso, iso, +FORMAT FORMAT is interpreted like 'date'</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Display values are in units of the first available SIZE from --block-size,
|
||
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
|
||
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).</p>
|
||
<p>SIZE is an integer and optional unit (example: 10M is 10<em>1024</em>1024).
|
||
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers
|
||
of 1000).</p>
|
||
<p>PATTERN allows some advanced exclusions. For example, the following syntaxes
|
||
are supported:
|
||
<code>?</code> will match only one character
|
||
<code>*</code> will match zero or more characters
|
||
<code>{a,b}</code> will match a or b</p>
|
||
<h2 id="examples-24"><a class="header" href="#examples-24">Examples</a></h2>
|
||
<p>List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB):</p>
|
||
<pre><code class="language-shell">du -{{b|k|m}} {{path/to/directory}}
|
||
</code></pre>
|
||
<p>List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size):</p>
|
||
<pre><code class="language-shell">du -h {{path/to/directory}}
|
||
</code></pre>
|
||
<p>Show the size of a single directory, in human-readable units:</p>
|
||
<pre><code class="language-shell">du -sh {{path/to/directory}}
|
||
</code></pre>
|
||
<p>List the human-readable sizes of a directory and of all the files and directories within it:</p>
|
||
<pre><code class="language-shell">du -ah {{path/to/directory}}
|
||
</code></pre>
|
||
<p>List the human-readable sizes of a directory and any subdirectories, up to N levels deep:</p>
|
||
<pre><code class="language-shell">du -h --max-depth=N {{path/to/directory}}
|
||
</code></pre>
|
||
<p>List the human-readable size of all <code>.jpg</code> files in subdirectories of the current directory, and show a cumulative total at the end:</p>
|
||
<pre><code class="language-shell">du -ch {{*/*.jpg}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="echo"><a class="header" href="#echo">echo</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>echo [OPTIONS]... [STRING]...
|
||
</code></pre>
|
||
<p>Display a line of text</p>
|
||
<h2 id="options-25"><a class="header" href="#options-25">Options</a></h2>
|
||
<dl><dt><code>-n</code></dt>
|
||
<dd>
|
||
<p>do not output the trailing newline</p>
|
||
</dd>
|
||
<dt><code>-e</code></dt>
|
||
<dd>
|
||
<p>enable interpretation of backslash escapes</p>
|
||
</dd>
|
||
<dt><code>-E</code></dt>
|
||
<dd>
|
||
<p>disable interpretation of backslash escapes (default)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Echo the STRING(s) to standard output.</p>
|
||
<p>If -e is in effect, the following sequences are recognized:</p>
|
||
<p>\ backslash
|
||
\a alert (BEL)
|
||
\b backspace
|
||
\c produce no further output
|
||
\e escape
|
||
\f form feed
|
||
\n new line
|
||
\r carriage return
|
||
\t horizontal tab
|
||
\v vertical tab
|
||
\0NNN byte with octal value NNN (1 to 3 digits)
|
||
\xHH byte with hexadecimal value HH (1 to 2 digits)</p>
|
||
<h2 id="examples-25"><a class="header" href="#examples-25">Examples</a></h2>
|
||
<p>Print a text message. Note: quotes are optional:</p>
|
||
<pre><code class="language-shell">echo "{{Hello World}}"
|
||
</code></pre>
|
||
<p>Print a message with environment variables:</p>
|
||
<pre><code class="language-shell">echo "{{My path is $PATH}}"
|
||
</code></pre>
|
||
<p>Print a message without the trailing newline:</p>
|
||
<pre><code class="language-shell">echo -n "{{Hello World}}"
|
||
</code></pre>
|
||
<p>Append a message to the file:</p>
|
||
<pre><code class="language-shell">echo "{{Hello World}}" >> {{file.txt}}
|
||
</code></pre>
|
||
<p>Enable interpretation of backslash escapes (special characters):</p>
|
||
<pre><code class="language-shell">echo -e "{{Column 1\tColumn 2}}"
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="env-1"><a class="header" href="#env-1">env</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
|
||
</code></pre>
|
||
<p>Set each NAME to VALUE in the environment and run COMMAND</p>
|
||
<h2 id="options-26"><a class="header" href="#options-26">Options</a></h2>
|
||
<dl><dt><code>--ignore-environment</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>start with an empty environment</p>
|
||
</dd>
|
||
<dt><code>--chdir=<DIR></code>, <code>-C <DIR></code></dt>
|
||
<dd>
|
||
<p>change working directory to DIR</p>
|
||
</dd>
|
||
<dt><code>--null</code>, <code>-0</code></dt>
|
||
<dd>
|
||
<p>end each output line with a 0 byte rather than a newline (only valid when printing the environment)</p>
|
||
</dd>
|
||
<dt><code>--file=<PATH></code>, <code>-f <PATH></code></dt>
|
||
<dd>
|
||
<p>read and set variables from a ".env"-style configuration file (prior to any unset and/or set)</p>
|
||
</dd>
|
||
<dt><code>--unset=<NAME></code>, <code>-u <NAME></code></dt>
|
||
<dd>
|
||
<p>remove variable from the environment</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>A mere - implies -i. If no COMMAND, print the resulting environment.</p>
|
||
<h2 id="examples-26"><a class="header" href="#examples-26">Examples</a></h2>
|
||
<p>Show the environment:</p>
|
||
<pre><code class="language-shell">env
|
||
</code></pre>
|
||
<p>Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program:</p>
|
||
<pre><code class="language-shell">env {{program}}
|
||
</code></pre>
|
||
<p>Clear the environment and run a program:</p>
|
||
<pre><code class="language-shell">env -i {{program}}
|
||
</code></pre>
|
||
<p>Remove variable from the environment and run a program:</p>
|
||
<pre><code class="language-shell">env -u {{variable}} {{program}}
|
||
</code></pre>
|
||
<p>Set a variable and run a program:</p>
|
||
<pre><code class="language-shell">env {{variable}}={{value}} {{program}}
|
||
</code></pre>
|
||
<p>Set multiple variables and run a program:</p>
|
||
<pre><code class="language-shell">env {{variable1}}={{value}} {{variable2}}={{value}} {{variable3}}={{value}} {{program}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="expand"><a class="header" href="#expand">expand</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>expand [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Convert tabs in each <code>FILE</code> to spaces, writing to standard output.
|
||
With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read standard input.</p>
|
||
<h2 id="options-27"><a class="header" href="#options-27">Options</a></h2>
|
||
<dl><dt><code>--initial</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>do not convert tabs after non blanks</p>
|
||
</dd>
|
||
<dt><code>--tabs=<N, LIST></code>, <code>-t <N, LIST></code></dt>
|
||
<dd>
|
||
<p>have tabs N characters apart, not 8 or use comma separated list of explicit tab positions</p>
|
||
</dd>
|
||
<dt><code>--no-utf8</code>, <code>-U</code></dt>
|
||
<dd>
|
||
<p>interpret input file as 8-bit ASCII rather than UTF-8</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-27"><a class="header" href="#examples-27">Examples</a></h2>
|
||
<p>Convert tabs in each file to spaces, writing to standard output:</p>
|
||
<pre><code class="language-shell">expand {{path/to/file}}
|
||
</code></pre>
|
||
<p>Convert tabs to spaces, reading from standard input:</p>
|
||
<pre><code class="language-shell">expand
|
||
</code></pre>
|
||
<p>Do not convert tabs after non blanks:</p>
|
||
<pre><code class="language-shell">expand -i {{path/to/file}}
|
||
</code></pre>
|
||
<p>Have tabs a certain number of characters apart, not 8:</p>
|
||
<pre><code class="language-shell">expand -t={{number}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Use a comma separated list of explicit tab positions:</p>
|
||
<pre><code class="language-shell">expand -t={{1,4,6}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="expr"><a class="header" href="#expr">expr</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>expr [EXPRESSION]
|
||
expr [OPTIONS]
|
||
</code></pre>
|
||
<p>Print the value of <code>EXPRESSION</code> to standard output</p>
|
||
<h2 id="options-28"><a class="header" href="#options-28">Options</a></h2>
|
||
<dl><dt><code>--version</code></dt>
|
||
<dd>
|
||
<p>output version information and exit</p>
|
||
</dd>
|
||
<dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>display this help and exit</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Print the value of <code>EXPRESSION</code> to standard output. A blank line below
|
||
separates increasing precedence groups.</p>
|
||
<p><code>EXPRESSION</code> may be:</p>
|
||
<ul>
|
||
<li><code>ARG1 | ARG2</code>: <code>ARG1</code> if it is neither null nor 0, otherwise <code>ARG2</code></li>
|
||
<li><code>ARG1 & ARG2</code>: <code>ARG1</code> if neither argument is null or 0, otherwise 0</li>
|
||
<li><code>ARG1 < ARG2</code>: <code>ARG1</code> is less than <code>ARG2</code></li>
|
||
<li><code>ARG1 <= ARG2</code>: <code>ARG1</code> is less than or equal to <code>ARG2</code></li>
|
||
<li><code>ARG1 = ARG2</code>: <code>ARG1</code> is equal to <code>ARG2</code></li>
|
||
<li><code>ARG1 != ARG2</code>: <code>ARG1</code> is unequal to <code>ARG2</code></li>
|
||
<li><code>ARG1 >= ARG2</code>: <code>ARG1</code> is greater than or equal to <code>ARG2</code></li>
|
||
<li><code>ARG1 > ARG2</code>: <code>ARG1</code> is greater than <code>ARG2</code></li>
|
||
<li><code>ARG1 + ARG2</code>: arithmetic sum of <code>ARG1</code> and <code>ARG2</code></li>
|
||
<li><code>ARG1 - ARG2</code>: arithmetic difference of <code>ARG1</code> and <code>ARG2</code></li>
|
||
<li><code>ARG1 * ARG2</code>: arithmetic product of <code>ARG1</code> and <code>ARG2</code></li>
|
||
<li><code>ARG1 / ARG2</code>: arithmetic quotient of <code>ARG1</code> divided by <code>ARG2</code></li>
|
||
<li><code>ARG1 % ARG2</code>: arithmetic remainder of <code>ARG1</code> divided by <code>ARG2</code></li>
|
||
<li><code>STRING : REGEXP</code>: anchored pattern match of <code>REGEXP</code> in <code>STRING</code></li>
|
||
<li><code>match STRING REGEXP</code>: same as <code>STRING : REGEXP</code></li>
|
||
<li><code>substr STRING POS LENGTH</code>: substring of <code>STRING</code>, <code>POS</code> counted from 1</li>
|
||
<li><code>index STRING CHARS</code>: index in <code>STRING</code> where any <code>CHARS</code> is found, or 0</li>
|
||
<li><code>length STRING</code>: length of <code>STRING</code></li>
|
||
<li><code>+ TOKEN</code>: interpret <code>TOKEN</code> as a string, even if it is a keyword like <code>match</code>
|
||
or an operator like <code>/</code></li>
|
||
<li><code>( EXPRESSION )</code>: value of <code>EXPRESSION</code></li>
|
||
</ul>
|
||
<p>Beware that many operators need to be escaped or quoted for shells.
|
||
Comparisons are arithmetic if both ARGs are numbers, else lexicographical.
|
||
Pattern matches return the string matched between ( and ) or null; if
|
||
( and ) are not used, they return the number of characters matched or 0.</p>
|
||
<p>Exit status is <code>0</code> if <code>EXPRESSION</code> is neither null nor <code>0</code>, <code>1</code> if <code>EXPRESSION</code>
|
||
is null or <code>0</code>, <code>2</code> if <code>EXPRESSION</code> is syntactically invalid, and <code>3</code> if an
|
||
error occurred.</p>
|
||
<p>Environment variables:</p>
|
||
<ul>
|
||
<li><code>EXPR_DEBUG_TOKENS=1</code>: dump expression's tokens</li>
|
||
<li><code>EXPR_DEBUG_RPN=1</code>: dump expression represented in reverse polish notation</li>
|
||
<li><code>EXPR_DEBUG_SYA_STEP=1</code>: dump each parser step</li>
|
||
<li><code>EXPR_DEBUG_AST=1</code>: dump expression represented abstract syntax tree</li>
|
||
</ul>
|
||
<h2 id="examples-28"><a class="header" href="#examples-28">Examples</a></h2>
|
||
<p>Get the length of a specific string:</p>
|
||
<pre><code class="language-shell">expr length "{{string}}"
|
||
</code></pre>
|
||
<p>Get the substring of a string with a specific length:</p>
|
||
<pre><code class="language-shell">expr substr "{{string}}" {{from}} {{length}}
|
||
</code></pre>
|
||
<p>Match a specific substring against an anchored pattern:</p>
|
||
<pre><code class="language-shell">expr match "{{string}}" '{{pattern}}'
|
||
</code></pre>
|
||
<p>Get the first char position from a specific set in a string:</p>
|
||
<pre><code class="language-shell">expr index "{{string}}" "{{chars}}"
|
||
</code></pre>
|
||
<p>Calculate a specific mathematic expression:</p>
|
||
<pre><code class="language-shell">expr {{expression1}} {{+|-|*|/|%}} {{expression2}}
|
||
</code></pre>
|
||
<p>Get the first expression if its value is non-zero and not null otherwise get the second one:</p>
|
||
<pre><code class="language-shell">expr {{expression1}} \| {{expression2}}
|
||
</code></pre>
|
||
<p>Get the first expression if both expressions are non-zero and not null otherwise get zero:</p>
|
||
<pre><code class="language-shell">expr {{expression1}} \& {{expression2}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="factor"><a class="header" href="#factor">factor</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>factor [OPTION]... [NUMBER]...
|
||
</code></pre>
|
||
<p>Print the prime factors of the given NUMBER(s).
|
||
If none are specified, read from standard input.</p>
|
||
<h2 id="options-29"><a class="header" href="#options-29">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--exponents</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>Print factors in the form p^e</p>
|
||
</dd>
|
||
<dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-29"><a class="header" href="#examples-29">Examples</a></h2>
|
||
<p>Display the prime-factorization of a number:</p>
|
||
<pre><code class="language-shell">factor {{number}}
|
||
</code></pre>
|
||
<p>Take the input from <code>stdin</code> if no argument is specified:</p>
|
||
<pre><code class="language-shell">echo {{number}} | factor
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="false"><a class="header" href="#false">false</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>false
|
||
</code></pre>
|
||
<p>Returns false, an unsuccessful exit status.</p>
|
||
<p>Immediately returns with the exit status <code>1</code>. When invoked with one of the recognized options it
|
||
will try to write the help or version text. Any IO error during this operation is diagnosed, yet
|
||
the program will also return <code>1</code>.</p>
|
||
<h2 id="options-30"><a class="header" href="#options-30">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information</p>
|
||
</dd>
|
||
<dt><code>--version</code></dt>
|
||
<dd>
|
||
<p>Print version information</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-30"><a class="header" href="#examples-30">Examples</a></h2>
|
||
<p>Return a non-zero exit code:</p>
|
||
<pre><code class="language-shell">false
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="fmt-1"><a class="header" href="#fmt-1">fmt</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>fmt [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Reformat paragraphs from input files (or stdin) to stdout.</p>
|
||
<h2 id="options-31"><a class="header" href="#options-31">Options</a></h2>
|
||
<dl><dt><code>--crown-margin</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>First and second line of paragraph may have different indentations, in which case the first line's indentation is preserved, and each subsequent line's indentation matches the second line.</p>
|
||
</dd>
|
||
<dt><code>--tagged-paragraph</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>Like -c, except that the first and second line of a paragraph <em>must</em> have different indentation or they are treated as separate paragraphs.</p>
|
||
</dd>
|
||
<dt><code>--preserve-headers</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>Attempt to detect and preserve mail headers in the input. Be careful when combining this flag with -p.</p>
|
||
</dd>
|
||
<dt><code>--split-only</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>Split lines only, do not reflow.</p>
|
||
</dd>
|
||
<dt><code>--uniform-spacing</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>Insert exactly one space between words, and two between sentences. Sentence breaks in the input are detected as [?!.] followed by two spaces or a newline; other punctuation is not interpreted as a sentence break.</p>
|
||
</dd>
|
||
<dt><code>--prefix=<PREFIX></code>, <code>-p <PREFIX></code></dt>
|
||
<dd>
|
||
<p>Reformat only lines beginning with PREFIX, reattaching PREFIX to reformatted lines. Unless -x is specified, leading whitespace will be ignored when matching PREFIX.</p>
|
||
</dd>
|
||
<dt><code>--skip-prefix=<PSKIP></code>, <code>-P <PSKIP></code></dt>
|
||
<dd>
|
||
<p>Do not reformat lines beginning with PSKIP. Unless -X is specified, leading whitespace will be ignored when matching PSKIP</p>
|
||
</dd>
|
||
<dt><code>--exact-prefix</code>, <code>-x</code></dt>
|
||
<dd>
|
||
<p>PREFIX must match at the beginning of the line with no preceding whitespace.</p>
|
||
</dd>
|
||
<dt><code>--exact-skip-prefix</code>, <code>-X</code></dt>
|
||
<dd>
|
||
<p>PSKIP must match at the beginning of the line with no preceding whitespace.</p>
|
||
</dd>
|
||
<dt><code>--width=<WIDTH></code>, <code>-w <WIDTH></code></dt>
|
||
<dd>
|
||
<p>Fill output lines up to a maximum of WIDTH columns, default 79.</p>
|
||
</dd>
|
||
<dt><code>--goal=<GOAL></code>, <code>-g <GOAL></code></dt>
|
||
<dd>
|
||
<p>Goal width, default ~0.94*WIDTH. Must be less than WIDTH.</p>
|
||
</dd>
|
||
<dt><code>--quick</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Break lines more quickly at the expense of a potentially more ragged appearance.</p>
|
||
</dd>
|
||
<dt><code>--tab-width=<TABWIDTH></code>, <code>-T <TABWIDTH></code></dt>
|
||
<dd>
|
||
<p>Treat tabs as TABWIDTH spaces for determining line length, default 8. Note that this is used only for calculating line lengths; tabs are preserved in the output.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-31"><a class="header" href="#examples-31">Examples</a></h2>
|
||
<p>Reformat a file:</p>
|
||
<pre><code class="language-shell">fmt {{path/to/file}}
|
||
</code></pre>
|
||
<p>Reformat a file producing output lines of (at most) <code>n</code> characters:</p>
|
||
<pre><code class="language-shell">fmt -w {{n}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Reformat a file without joining lines shorter than the given width together:</p>
|
||
<pre><code class="language-shell">fmt -s {{path/to/file}}
|
||
</code></pre>
|
||
<p>Reformat a file with uniform spacing (1 space between words and 2 spaces between paragraphs):</p>
|
||
<pre><code class="language-shell">fmt -u {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="fold"><a class="header" href="#fold">fold</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>fold [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Writes each file (or standard input if no files are given)
|
||
to standard output whilst breaking long lines</p>
|
||
<h2 id="options-32"><a class="header" href="#options-32">Options</a></h2>
|
||
<dl><dt><code>--bytes</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>count using bytes rather than columns (meaning control characters such as newline are not treated specially)</p>
|
||
</dd>
|
||
<dt><code>--spaces</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>break lines at word boundaries rather than a hard cut-off</p>
|
||
</dd>
|
||
<dt><code>--width=<WIDTH></code>, <code>-w <WIDTH></code></dt>
|
||
<dd>
|
||
<p>set WIDTH as the maximum line width rather than 80</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-32"><a class="header" href="#examples-32">Examples</a></h2>
|
||
<p>Wrap each line to default width (80 characters):</p>
|
||
<pre><code class="language-shell">fold {{path/to/file}}
|
||
</code></pre>
|
||
<p>Wrap each line to width "30":</p>
|
||
<pre><code class="language-shell">fold -w30 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Wrap each line to width "5" and break the line at spaces (puts each space separated word in a new line, words with length > 5 are wrapped):</p>
|
||
<pre><code class="language-shell">fold -w5 -s {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="groups"><a class="header" href="#groups">groups</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>groups [OPTION]... [USERNAME]...
|
||
</code></pre>
|
||
<p>Print group memberships for each <code>USERNAME</code> or, if no <code>USERNAME</code> is specified, for
|
||
the current process (which may differ if the groups data‐base has changed).</p>
|
||
<h2 id="options-33"><a class="header" href="#options-33">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-33"><a class="header" href="#examples-33">Examples</a></h2>
|
||
<p>Print group memberships for the current user:</p>
|
||
<pre><code class="language-shell">groups
|
||
</code></pre>
|
||
<p>Print group memberships for a list of users:</p>
|
||
<pre><code class="language-shell">groups {{username1 username2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="hashsum-1"><a class="header" href="#hashsum-1">hashsum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>hashsum [OPTIONS] [FILE]...
|
||
</code></pre>
|
||
<p>Compute and check message digests.</p>
|
||
<h2 id="options-34"><a class="header" href="#options-34">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--bits=<BITS></code></dt>
|
||
<dd>
|
||
<p>set the size of the output (only for SHAKE)</p>
|
||
</dd>
|
||
<dt><code>--no-names</code></dt>
|
||
<dd>
|
||
<p>Omits filenames in the output (option not present in GNU/Coreutils)</p>
|
||
</dd>
|
||
<dt><code>--md5</code></dt>
|
||
<dd>
|
||
<p>work with MD5</p>
|
||
</dd>
|
||
<dt><code>--sha1</code></dt>
|
||
<dd>
|
||
<p>work with SHA1</p>
|
||
</dd>
|
||
<dt><code>--sha224</code></dt>
|
||
<dd>
|
||
<p>work with SHA224</p>
|
||
</dd>
|
||
<dt><code>--sha256</code></dt>
|
||
<dd>
|
||
<p>work with SHA256</p>
|
||
</dd>
|
||
<dt><code>--sha384</code></dt>
|
||
<dd>
|
||
<p>work with SHA384</p>
|
||
</dd>
|
||
<dt><code>--sha512</code></dt>
|
||
<dd>
|
||
<p>work with SHA512</p>
|
||
</dd>
|
||
<dt><code>--sha3</code></dt>
|
||
<dd>
|
||
<p>work with SHA3</p>
|
||
</dd>
|
||
<dt><code>--sha3-224</code></dt>
|
||
<dd>
|
||
<p>work with SHA3-224</p>
|
||
</dd>
|
||
<dt><code>--sha3-256</code></dt>
|
||
<dd>
|
||
<p>work with SHA3-256</p>
|
||
</dd>
|
||
<dt><code>--sha3-384</code></dt>
|
||
<dd>
|
||
<p>work with SHA3-384</p>
|
||
</dd>
|
||
<dt><code>--sha3-512</code></dt>
|
||
<dd>
|
||
<p>work with SHA3-512</p>
|
||
</dd>
|
||
<dt><code>--shake128</code></dt>
|
||
<dd>
|
||
<p>work with SHAKE128 using BITS for the output size</p>
|
||
</dd>
|
||
<dt><code>--shake256</code></dt>
|
||
<dd>
|
||
<p>work with SHAKE256 using BITS for the output size</p>
|
||
</dd>
|
||
<dt><code>--b2sum</code></dt>
|
||
<dd>
|
||
<p>work with BLAKE2</p>
|
||
</dd>
|
||
<dt><code>--b3sum</code></dt>
|
||
<dd>
|
||
<p>work with BLAKE3</p>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="head"><a class="header" href="#head">head</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>head [FLAG]... [FILE]...
|
||
</code></pre>
|
||
<p>Print the first 10 lines of each <code>FILE</code> to standard output.
|
||
With more than one <code>FILE</code>, precede each with a header giving the file name.
|
||
With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read standard input.</p>
|
||
<p>Mandatory arguments to long flags are mandatory for short flags too.</p>
|
||
<h2 id="options-35"><a class="header" href="#options-35">Options</a></h2>
|
||
<dl><dt><code>--bytes=<[-]NUM></code>, <code>-c <[-]NUM></code></dt>
|
||
<dd>
|
||
<p>print the first NUM bytes of each file;<br />with the leading '-', print all but the last<br />NUM bytes of each file</p>
|
||
</dd>
|
||
<dt><code>--lines=<[-]NUM></code>, <code>-n <[-]NUM></code></dt>
|
||
<dd>
|
||
<p>print the first NUM lines instead of the first 10;<br />with the leading '-', print all but the last<br />NUM lines of each file</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>--silent</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>never print headers giving file names</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>always print headers giving file names</p>
|
||
</dd>
|
||
<dt><code>--presume-input-pipe</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-34"><a class="header" href="#examples-34">Examples</a></h2>
|
||
<p>Output the first few lines of a file:</p>
|
||
<pre><code class="language-shell">head -n {{count}} {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="hostid"><a class="header" href="#hostid">hostid</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>hostid [options]
|
||
</code></pre>
|
||
<p>Print the numeric identifier (in hexadecimal) for the current host</p>
|
||
<h2 id="options-36"><a class="header" href="#options-36">Options</a></h2>
|
||
<dl></dl>
|
||
<h2 id="examples-35"><a class="header" href="#examples-35">Examples</a></h2>
|
||
<p>Display the numeric identifier for the current host in hexadecimal:</p>
|
||
<pre><code class="language-shell">hostid
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="hostname"><a class="header" href="#hostname">hostname</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>hostname [OPTION]... [HOSTNAME]
|
||
</code></pre>
|
||
<p>Display or set the system's host name.</p>
|
||
<h2 id="options-37"><a class="header" href="#options-37">Options</a></h2>
|
||
<dl><dt><code>--domain</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Display the name of the DNS domain if possible</p>
|
||
</dd>
|
||
<dt><code>--ip-address</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>Display the network address(es) of the host</p>
|
||
</dd>
|
||
<dt><code>--fqdn</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>Display the FQDN (Fully Qualified Domain Name) (default)</p>
|
||
</dd>
|
||
<dt><code>--short</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>Display the short hostname (the portion before the first dot) if possible</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-36"><a class="header" href="#examples-36">Examples</a></h2>
|
||
<p>Show current host name:</p>
|
||
<pre><code class="language-shell">hostname
|
||
</code></pre>
|
||
<p>Show the network address of the host name:</p>
|
||
<pre><code class="language-shell">hostname -i
|
||
</code></pre>
|
||
<p>Show all network addresses of the host:</p>
|
||
<pre><code class="language-shell">hostname -I
|
||
</code></pre>
|
||
<p>Show the FQDN (Fully Qualified Domain Name):</p>
|
||
<pre><code class="language-shell">hostname --fqdn
|
||
</code></pre>
|
||
<p>Set current host name:</p>
|
||
<pre><code class="language-shell">hostname {{new_hostname}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="id"><a class="header" href="#id">id</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>id [OPTION]... [USER]...
|
||
</code></pre>
|
||
<p>Print user and group information for each specified <code>USER</code>,
|
||
or (when <code>USER</code> omitted) for the current user.</p>
|
||
<h2 id="options-38"><a class="header" href="#options-38">Options</a></h2>
|
||
<dl><dt><code>-A</code></dt>
|
||
<dd>
|
||
<p>Display the process audit user ID and other process audit properties,<br />which requires privilege (not available on Linux).</p>
|
||
</dd>
|
||
<dt><code>--user</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>Display only the effective user ID as a number.</p>
|
||
</dd>
|
||
<dt><code>--group</code>, <code>-g</code></dt>
|
||
<dd>
|
||
<p>Display only the effective group ID as a number</p>
|
||
</dd>
|
||
<dt><code>--groups</code>, <code>-G</code></dt>
|
||
<dd>
|
||
<p>Display only the different group IDs as white-space separated numbers, in no particular order.</p>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>Make the output human-readable. Each display is on a separate line.</p>
|
||
</dd>
|
||
<dt><code>--name</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>Display the name of the user or group ID for the -G, -g and -u options instead of the number.<br />If any of the ID numbers cannot be mapped into names, the number will be displayed as usual.</p>
|
||
</dd>
|
||
<dt><code>-P</code></dt>
|
||
<dd>
|
||
<p>Display the id as a password file entry.</p>
|
||
</dd>
|
||
<dt><code>--real</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>Display the real ID for the -G, -g and -u options instead of the effective ID.</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>delimit entries with NUL characters, not whitespace;<br />not permitted in default format</p>
|
||
</dd>
|
||
<dt><code>--context</code>, <code>-Z</code></dt>
|
||
<dd>
|
||
<p>print only the security context of the process</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>The id utility displays the user and group names and numeric IDs, of the
|
||
calling process, to the standard output. If the real and effective IDs are
|
||
different, both are displayed, otherwise only the real ID is displayed.</p>
|
||
<p>If a user (login name or user ID) is specified, the user and group IDs of
|
||
that user are displayed. In this case, the real and effective IDs are
|
||
assumed to be the same.</p>
|
||
<h2 id="examples-37"><a class="header" href="#examples-37">Examples</a></h2>
|
||
<p>Display current user's ID (UID), group ID (GID) and groups to which they belong:</p>
|
||
<pre><code class="language-shell">id
|
||
</code></pre>
|
||
<p>Display the current user identity as a number:</p>
|
||
<pre><code class="language-shell">id -u
|
||
</code></pre>
|
||
<p>Display the current group identity as a number:</p>
|
||
<pre><code class="language-shell">id -g
|
||
</code></pre>
|
||
<p>Display an arbitrary user's ID (UID), group ID (GID) and groups to which they belong:</p>
|
||
<pre><code class="language-shell">id {{username}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="install"><a class="header" href="#install">install</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>install [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Copy SOURCE to DEST or multiple SOURCE(s) to the existing
|
||
DIRECTORY, while setting permission modes and owner/group</p>
|
||
<h2 id="options-39"><a class="header" href="#options-39">Options</a></h2>
|
||
<dl><dt><code>--backup=<CONTROL></code></dt>
|
||
<dd>
|
||
<p>make a backup of each existing destination file</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>like --backup but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>-c</code></dt>
|
||
<dd>
|
||
<p>ignored</p>
|
||
</dd>
|
||
<dt><code>--compare</code>, <code>-C</code></dt>
|
||
<dd>
|
||
<p>compare each pair of source and destination files, and in some cases, do not modify the destination at all</p>
|
||
</dd>
|
||
<dt><code>--directory</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>treat all arguments as directory names. create all components of the specified directories</p>
|
||
</dd>
|
||
<dt><code>-D</code></dt>
|
||
<dd>
|
||
<p>create all leading components of DEST except the last, then copy SOURCE to DEST</p>
|
||
</dd>
|
||
<dt><code>--group=<GROUP></code>, <code>-g <GROUP></code></dt>
|
||
<dd>
|
||
<p>set group ownership, instead of process's current group</p>
|
||
</dd>
|
||
<dt><code>--mode=<MODE></code>, <code>-m <MODE></code></dt>
|
||
<dd>
|
||
<p>set permission mode (as in chmod), instead of rwxr-xr-x</p>
|
||
</dd>
|
||
<dt><code>--owner=<OWNER></code>, <code>-o <OWNER></code></dt>
|
||
<dd>
|
||
<p>set ownership (super-user only)</p>
|
||
</dd>
|
||
<dt><code>--preserve-timestamps</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>apply access/modification times of SOURCE files to corresponding destination files</p>
|
||
</dd>
|
||
<dt><code>--strip</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>strip symbol tables (no action Windows)</p>
|
||
</dd>
|
||
<dt><code>--strip-program=<PROGRAM></code></dt>
|
||
<dd>
|
||
<p>program used to strip binaries (no action Windows)</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code>, <code>-S <SUFFIX></code></dt>
|
||
<dd>
|
||
<p>override the usual backup suffix</p>
|
||
</dd>
|
||
<dt><code>--target-directory=<DIRECTORY></code>, <code>-t <DIRECTORY></code></dt>
|
||
<dd>
|
||
<p>move all SOURCE arguments into DIRECTORY</p>
|
||
</dd>
|
||
<dt><code>--no-target-directory</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>(unimplemented) treat DEST as a normal file</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>explain what is being done</p>
|
||
</dd>
|
||
<dt><code>--preserve-context</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>(unimplemented) preserve security context</p>
|
||
</dd>
|
||
<dt><code>--context=<CONTEXT></code>, <code>-Z <CONTEXT></code></dt>
|
||
<dd>
|
||
<p>(unimplemented) set security context of files and directories</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-38"><a class="header" href="#examples-38">Examples</a></h2>
|
||
<p>Copy files to the destination:</p>
|
||
<pre><code class="language-shell">install {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<p>Copy files to the destination, setting their ownership:</p>
|
||
<pre><code class="language-shell">install --owner {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<p>Copy files to the destination, setting their group ownership:</p>
|
||
<pre><code class="language-shell">install --group {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<p>Copy files to the destination, setting their <code>mode</code>:</p>
|
||
<pre><code class="language-shell">install --mode {{+x}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<p>Copy files and apply access/modification times of source to the destination:</p>
|
||
<pre><code class="language-shell">install --preserve-timestamps {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<p>Copy files and create the directories at the destination if they don't exist:</p>
|
||
<pre><code class="language-shell">install -D {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="join"><a class="header" href="#join">join</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>join [OPTIONS] <FILE1> <FILE2>
|
||
</code></pre>
|
||
<p>For each pair of input lines with identical join fields, write a line to
|
||
standard output. The default join field is the first, delimited by blanks.</p>
|
||
<p>When <code>FILE1</code> or <code>FILE2</code> (not both) is <code>-</code>, read standard input.</p>
|
||
<h2 id="options-40"><a class="header" href="#options-40">Options</a></h2>
|
||
<dl><dt><code>-a <FILENUM></code></dt>
|
||
<dd>
|
||
<p>also print unpairable lines from file FILENUM, where<br />FILENUM is 1 or 2, corresponding to FILE1 or FILE2</p>
|
||
</dd>
|
||
<dt><code>-v <FILENUM></code></dt>
|
||
<dd>
|
||
<p>like -a FILENUM, but suppress joined output lines</p>
|
||
</dd>
|
||
<dt><code>-e <EMPTY></code></dt>
|
||
<dd>
|
||
<p>replace missing input fields with EMPTY</p>
|
||
</dd>
|
||
<dt><code>--ignore-case</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>ignore differences in case when comparing fields</p>
|
||
</dd>
|
||
<dt><code>-j <FIELD></code></dt>
|
||
<dd>
|
||
<p>equivalent to '-1 FIELD -2 FIELD'</p>
|
||
</dd>
|
||
<dt><code>-o <FORMAT></code></dt>
|
||
<dd>
|
||
<p>obey FORMAT while constructing output line</p>
|
||
</dd>
|
||
<dt><code>-t <CHAR></code></dt>
|
||
<dd>
|
||
<p>use CHAR as input and output field separator</p>
|
||
</dd>
|
||
<dt><code>-1 <FIELD></code></dt>
|
||
<dd>
|
||
<p>join on this FIELD of file 1</p>
|
||
</dd>
|
||
<dt><code>-2 <FIELD></code></dt>
|
||
<dd>
|
||
<p>join on this FIELD of file 2</p>
|
||
</dd>
|
||
<dt><code>--check-order</code></dt>
|
||
<dd>
|
||
<p>check that the input is correctly sorted, even if all input lines are pairable</p>
|
||
</dd>
|
||
<dt><code>--nocheck-order</code></dt>
|
||
<dd>
|
||
<p>do not check that the input is correctly sorted</p>
|
||
</dd>
|
||
<dt><code>--header</code></dt>
|
||
<dd>
|
||
<p>treat the first line in each file as field headers, print them without trying to pair them</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-39"><a class="header" href="#examples-39">Examples</a></h2>
|
||
<p>Join two files on the first (default) field:</p>
|
||
<pre><code class="language-shell">join {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Join two files using a comma (instead of a space) as the field separator:</p>
|
||
<pre><code class="language-shell">join -t {{','}} {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Join field3 of file1 with field1 of file2:</p>
|
||
<pre><code class="language-shell">join -1 {{3}} -2 {{1}} {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Produce a line for each unpairable line for file1:</p>
|
||
<pre><code class="language-shell">join -a {{1}} {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Join a file from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">cat {{path/to/file1}} | join - {{path/to/file2}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="kill"><a class="header" href="#kill">kill</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>kill [OPTIONS]... PID...
|
||
</code></pre>
|
||
<p>Send signal to processes or list information about signals.</p>
|
||
<h2 id="options-41"><a class="header" href="#options-41">Options</a></h2>
|
||
<dl><dt><code>--list</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>Lists signals</p>
|
||
</dd>
|
||
<dt><code>--table</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>Lists table of signals</p>
|
||
</dd>
|
||
<dt><code>--signal=<signal></code>, <code>-s <signal></code></dt>
|
||
<dd>
|
||
<p>Sends given signal instead of SIGTERM</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-40"><a class="header" href="#examples-40">Examples</a></h2>
|
||
<p>Terminate a program using the default SIGTERM (terminate) signal:</p>
|
||
<pre><code class="language-shell">kill {{process_id}}
|
||
</code></pre>
|
||
<p>List available signal names (to be used without the <code>SIG</code> prefix):</p>
|
||
<pre><code class="language-shell">kill -l
|
||
</code></pre>
|
||
<p>Terminate a background job:</p>
|
||
<pre><code class="language-shell">kill %{{job_id}}
|
||
</code></pre>
|
||
<p>Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating:</p>
|
||
<pre><code class="language-shell">kill -{{1|HUP}} {{process_id}}
|
||
</code></pre>
|
||
<p>Terminate a program using the SIGINT (interrupt) signal. This is typically initiated by the user pressing <code>Ctrl + C</code>:</p>
|
||
<pre><code class="language-shell">kill -{{2|INT}} {{process_id}}
|
||
</code></pre>
|
||
<p>Signal the operating system to immediately terminate a program (which gets no chance to capture the signal):</p>
|
||
<pre><code class="language-shell">kill -{{9|KILL}} {{process_id}}
|
||
</code></pre>
|
||
<p>Signal the operating system to pause a program until a SIGCONT ("continue") signal is received:</p>
|
||
<pre><code class="language-shell">kill -{{17|STOP}} {{process_id}}
|
||
</code></pre>
|
||
<p>Send a <code>SIGUSR1</code> signal to all processes with the given GID (group id):</p>
|
||
<pre><code class="language-shell">kill -{{SIGUSR1}} -{{group_id}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="link"><a class="header" href="#link">link</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>link FILE1 FILE2
|
||
</code></pre>
|
||
<p>Call the link function to create a link named FILE2 to an existing FILE1.</p>
|
||
<h2 id="options-42"><a class="header" href="#options-42">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-41"><a class="header" href="#examples-41">Examples</a></h2>
|
||
<p>Create a hard link from a new file to an existing file:</p>
|
||
<pre><code class="language-shell">link {{path/to/existing_file}} {{path/to/new_file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="ln"><a class="header" href="#ln">ln</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>ln [OPTION]... [-T] TARGET LINK_NAME
|
||
ln [OPTION]... TARGET
|
||
ln [OPTION]... TARGET... DIRECTORY
|
||
ln [OPTION]... -t DIRECTORY TARGET...
|
||
</code></pre>
|
||
<p>Change file owner and group</p>
|
||
<h2 id="options-43"><a class="header" href="#options-43">Options</a></h2>
|
||
<dl><dt><code>--backup=<CONTROL></code></dt>
|
||
<dd>
|
||
<p>make a backup of each existing destination file</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>like --backup but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>--force</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>remove existing destination files</p>
|
||
</dd>
|
||
<dt><code>--interactive</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>prompt whether to remove existing destination files</p>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>treat LINK_NAME as a normal file if it is a symbolic link to a directory</p>
|
||
</dd>
|
||
<dt><code>--logical</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>follow TARGETs that are symbolic links</p>
|
||
</dd>
|
||
<dt><code>--physical</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>make hard links directly to symbolic links</p>
|
||
</dd>
|
||
<dt><code>--symbolic</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>make symbolic links instead of hard links</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code>, <code>-S <SUFFIX></code></dt>
|
||
<dd>
|
||
<p>override the usual backup suffix</p>
|
||
</dd>
|
||
<dt><code>--target-directory=<DIRECTORY></code>, <code>-t <DIRECTORY></code></dt>
|
||
<dd>
|
||
<p>specify the DIRECTORY in which to create the links</p>
|
||
</dd>
|
||
<dt><code>--no-target-directory</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>treat LINK_NAME as a normal file always</p>
|
||
</dd>
|
||
<dt><code>--relative</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>create symbolic links relative to link location</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>print name of each linked file</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>In the 1st form, create a link to TARGET with the name LINK_NAME.
|
||
In the 2nd form, create a link to TARGET in the current directory.
|
||
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
|
||
Create hard links by default, symbolic links with --symbolic.
|
||
By default, each destination (name of new link) should not already exist.
|
||
When creating hard links, each TARGET must exist. Symbolic links
|
||
can hold arbitrary text; if later resolved, a relative link is
|
||
interpreted in relation to its parent directory.</p>
|
||
<h2 id="examples-42"><a class="header" href="#examples-42">Examples</a></h2>
|
||
<p>Create a symbolic link to a file or directory:</p>
|
||
<pre><code class="language-shell">ln -s {{/path/to/file_or_directory}} {{path/to/symlink}}
|
||
</code></pre>
|
||
<p>Overwrite an existing symbolic link to point to a different file:</p>
|
||
<pre><code class="language-shell">ln -sf {{/path/to/new_file}} {{path/to/symlink}}
|
||
</code></pre>
|
||
<p>Create a hard link to a file:</p>
|
||
<pre><code class="language-shell">ln {{/path/to/file}} {{path/to/hardlink}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="logname"><a class="header" href="#logname">logname</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>logname
|
||
</code></pre>
|
||
<p>Print user's login name</p>
|
||
<h2 id="options-44"><a class="header" href="#options-44">Options</a></h2>
|
||
<dl></dl>
|
||
<h2 id="examples-43"><a class="header" href="#examples-43">Examples</a></h2>
|
||
<p>Display the currently logged in user's name:</p>
|
||
<pre><code class="language-shell">logname
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="ls"><a class="header" href="#ls">ls</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>ls [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>List directory contents.
|
||
Ignore files and directories starting with a '.' by default</p>
|
||
<h2 id="options-45"><a class="header" href="#options-45">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--format</code></dt>
|
||
<dd>
|
||
<p>Set the display format.</p>
|
||
</dd>
|
||
<dt><code>-C</code></dt>
|
||
<dd>
|
||
<p>Display the files in columns.</p>
|
||
</dd>
|
||
<dt><code>--long</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>Display detailed information.</p>
|
||
</dd>
|
||
<dt><code>-x</code></dt>
|
||
<dd>
|
||
<p>List entries in rows instead of in columns.</p>
|
||
</dd>
|
||
<dt><code>--tabsize=<COLS></code>, <code>-T <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume tab stops at each COLS instead of 8 (unimplemented)</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>List entries separated by commas.</p>
|
||
</dd>
|
||
<dt><code>--zero</code></dt>
|
||
<dd>
|
||
<p>List entries separated by ASCII NUL characters.</p>
|
||
</dd>
|
||
<dt><code>--dired</code>, <code>-D</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-1</code></dt>
|
||
<dd>
|
||
<p>List one file per line.</p>
|
||
</dd>
|
||
<dt><code>-o</code></dt>
|
||
<dd>
|
||
<p>Long format without group information. Identical to --format=long with --no-group.</p>
|
||
</dd>
|
||
<dt><code>-g</code></dt>
|
||
<dd>
|
||
<p>Long format without owner information.</p>
|
||
</dd>
|
||
<dt><code>--numeric-uid-gid</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>-l with numeric UIDs and GIDs.</p>
|
||
</dd>
|
||
<dt><code>--quoting-style</code></dt>
|
||
<dd>
|
||
<p>Set quoting style.</p>
|
||
</dd>
|
||
<dt><code>--literal</code>, <code>-N</code></dt>
|
||
<dd>
|
||
<p>Use literal quoting style. Equivalent to <code>--quoting-style=literal</code></p>
|
||
</dd>
|
||
<dt><code>--escape</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>Use escape quoting style. Equivalent to <code>--quoting-style=escape</code></p>
|
||
</dd>
|
||
<dt><code>--quote-name</code>, <code>-Q</code></dt>
|
||
<dd>
|
||
<p>Use C quoting style. Equivalent to <code>--quoting-style=c</code></p>
|
||
</dd>
|
||
<dt><code>--hide-control-chars</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Replace control characters with '?' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--show-control-chars</code></dt>
|
||
<dd>
|
||
<p>Show control characters 'as is' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--time=<field></code></dt>
|
||
<dd>
|
||
<p>Show time in <field>:<br /> access time (-u): atime, access, use;<br /> change time (-t): ctime, status.<br /> birth time: birth, creation;</p>
|
||
</dd>
|
||
<dt><code>-c</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status change time (the 'ctime' in the inode) instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the status change time.</p>
|
||
</dd>
|
||
<dt><code>-u</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status access time instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the access time.</p>
|
||
</dd>
|
||
<dt><code>--hide=<PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN (overridden by -a or -A)</p>
|
||
</dd>
|
||
<dt><code>--ignore=<PATTERN></code>, <code>-I <PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN</p>
|
||
</dd>
|
||
<dt><code>--ignore-backups</code>, <code>-B</code></dt>
|
||
<dd>
|
||
<p>Ignore entries which end with ~.</p>
|
||
</dd>
|
||
<dt><code>--sort=<field></code></dt>
|
||
<dd>
|
||
<p>Sort by <field>: name, none (-U), time (-t), size (-S), extension (-X) or width</p>
|
||
</dd>
|
||
<dt><code>-S</code></dt>
|
||
<dd>
|
||
<p>Sort by file size, largest first.</p>
|
||
</dd>
|
||
<dt><code>-t</code></dt>
|
||
<dd>
|
||
<p>Sort by modification time (the 'mtime' in the inode), newest first.</p>
|
||
</dd>
|
||
<dt><code>-v</code></dt>
|
||
<dd>
|
||
<p>Natural sort of (version) numbers in the filenames.</p>
|
||
</dd>
|
||
<dt><code>-X</code></dt>
|
||
<dd>
|
||
<p>Sort alphabetically by entry extension.</p>
|
||
</dd>
|
||
<dt><code>-U</code></dt>
|
||
<dd>
|
||
<p>Do not sort; list the files in whatever order they are stored in the directory. This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster.</p>
|
||
</dd>
|
||
<dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>When showing file information for a symbolic link, show information for the file the link references rather than the link itself.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line-symlink-to-dir</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when they link to directories and are given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line</code>, <code>-H</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--no-group</code>, <code>-G</code></dt>
|
||
<dd>
|
||
<p>Do not show group in long format.</p>
|
||
</dd>
|
||
<dt><code>--author</code></dt>
|
||
<dd>
|
||
<p>Show author in long format. On the supported platforms, the author always matches the file owner.</p>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Do not ignore hidden files (files with names that start with '.').</p>
|
||
</dd>
|
||
<dt><code>--almost-all</code>, <code>-A</code></dt>
|
||
<dd>
|
||
<p>In a directory, do not ignore all file names that start with '.', only ignore '.' and '..'.</p>
|
||
</dd>
|
||
<dt><code>--directory</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Only list the names of directories, rather than listing directory contents. This will not follow symbolic links unless one of <code>--dereference-command-line (-H)</code>, <code>--dereference (-L)</code>, or <code>--dereference-command-line-symlink-to-dir</code> is specified.</p>
|
||
</dd>
|
||
<dt><code>--human-readable</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes (e.g. 1K 234M 56G).</p>
|
||
</dd>
|
||
<dt><code>--kibibytes</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>default to 1024-byte blocks for file system usage; used only with -s and per directory totals</p>
|
||
</dd>
|
||
<dt><code>--si</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes using powers of 1000 instead of 1024.</p>
|
||
</dd>
|
||
<dt><code>--block-size=<BLOCK_SIZE></code></dt>
|
||
<dd>
|
||
<p>scale sizes by BLOCK_SIZE when printing them</p>
|
||
</dd>
|
||
<dt><code>--inode</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>print the index number of each file</p>
|
||
</dd>
|
||
<dt><code>--reverse</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>Reverse whatever the sorting method is e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>List the contents of all directories recursively.</p>
|
||
</dd>
|
||
<dt><code>--width=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume that the terminal is COLS columns wide.</p>
|
||
</dd>
|
||
<dt><code>--size</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print the allocated size of each file, in blocks</p>
|
||
</dd>
|
||
<dt><code>--color</code></dt>
|
||
<dd>
|
||
<p>Color output based on file type.</p>
|
||
</dd>
|
||
<dt><code>--indicator-style</code></dt>
|
||
<dd>
|
||
<p>Append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)</p>
|
||
</dd>
|
||
<dt><code>--classify=<when></code>, <code>-F <when></code></dt>
|
||
<dd>
|
||
<p>Append a character to each file name indicating the file type. Also, for regular files that are executable, append '*'. The file type indicators are '/' for directories, '@' for symbolic links, '|' for FIFOs, '=' for sockets, '>' for doors, and nothing for regular files. when may be omitted, or one of:<br /> none - Do not classify. This is the default.<br /> auto - Only classify if standard output is a terminal.<br /> always - Always classify.<br />Specifying --classify and no when is equivalent to --classify=always. This will not follow symbolic links listed on the command line unless the --dereference-command-line (-H), --dereference (-L), or --dereference-command-line-symlink-to-dir options are specified.</p>
|
||
</dd>
|
||
<dt><code>--file-type</code></dt>
|
||
<dd>
|
||
<p>Same as --classify, but do not append '*'</p>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>Append / indicator to directories.</p>
|
||
</dd>
|
||
<dt><code>--time-style=<TIME_STYLE></code></dt>
|
||
<dd>
|
||
<p>time/date format with -l; see TIME_STYLE below</p>
|
||
</dd>
|
||
<dt><code>--full-time</code></dt>
|
||
<dd>
|
||
<p>like -l --time-style=full-iso</p>
|
||
</dd>
|
||
<dt><code>--context</code>, <code>-Z</code></dt>
|
||
<dd>
|
||
<p>print any security context of each file</p>
|
||
</dd>
|
||
<dt><code>--group-directories-first</code></dt>
|
||
<dd>
|
||
<p>group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted like in date. Also the TIME_STYLE environment variable sets the default style to use.</p>
|
||
<h2 id="examples-44"><a class="header" href="#examples-44">Examples</a></h2>
|
||
<p>List files one per line:</p>
|
||
<pre><code class="language-shell">ls -1
|
||
</code></pre>
|
||
<p>List all files, including hidden files:</p>
|
||
<pre><code class="language-shell">ls -a
|
||
</code></pre>
|
||
<p>List all files, with trailing <code>/</code> added to directory names:</p>
|
||
<pre><code class="language-shell">ls -F
|
||
</code></pre>
|
||
<p>Long format list (permissions, ownership, size, and modification date) of all files:</p>
|
||
<pre><code class="language-shell">ls -la
|
||
</code></pre>
|
||
<p>Long format list with size displayed using human-readable units (KiB, MiB, GiB):</p>
|
||
<pre><code class="language-shell">ls -lh
|
||
</code></pre>
|
||
<p>Long format list sorted by size (descending):</p>
|
||
<pre><code class="language-shell">ls -lS
|
||
</code></pre>
|
||
<p>Long format list of all files, sorted by modification date (oldest first):</p>
|
||
<pre><code class="language-shell">ls -ltr
|
||
</code></pre>
|
||
<p>Only list directories:</p>
|
||
<pre><code class="language-shell">ls -d */
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="md5sum"><a class="header" href="#md5sum">md5sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-46"><a class="header" href="#options-46">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-45"><a class="header" href="#examples-45">Examples</a></h2>
|
||
<p>Calculate the MD5 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">md5sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of MD5 checksums to a file:</p>
|
||
<pre><code class="language-shell">md5sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.md5}}
|
||
</code></pre>
|
||
<p>Calculate an MD5 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | md5sum
|
||
</code></pre>
|
||
<p>Read a file of MD5 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">md5sum --check {{path/to/file.md5}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">md5sum --check --quiet {{path/to/file.md5}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">md5sum --ignore-missing --check --quiet {{path/to/file.md5}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="mkdir"><a class="header" href="#mkdir">mkdir</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>mkdir [OPTION]... [USER]
|
||
</code></pre>
|
||
<p>Create the given DIRECTORY(ies) if they do not exist</p>
|
||
<h2 id="options-47"><a class="header" href="#options-47">Options</a></h2>
|
||
<dl><dt><code>--mode</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>set file mode (not implemented on windows)</p>
|
||
</dd>
|
||
<dt><code>--parents</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>make parent directories as needed</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>print a message for each printed directory</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Each MODE is of the form '[ugoa]*(<a href="utils/%5BrwxXst%5D*%7C%5Bugo%5D">-+=</a>)+|[-+=]?[0-7]+'.</p>
|
||
<h2 id="examples-46"><a class="header" href="#examples-46">Examples</a></h2>
|
||
<p>Create specific directories:</p>
|
||
<pre><code class="language-shell">mkdir {{path/to/directory1 path/to/directory2 ...}}
|
||
</code></pre>
|
||
<p>Create specific directories and their [p]arents if needed:</p>
|
||
<pre><code class="language-shell">mkdir -p {{path/to/directory1 path/to/directory2 ...}}
|
||
</code></pre>
|
||
<p>Create directories with specific permissions:</p>
|
||
<pre><code class="language-shell">mkdir -m {{rwxrw-r--}} {{path/to/directory1 path/to/directory2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="mkfifo"><a class="header" href="#mkfifo">mkfifo</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>mkfifo [OPTION]... NAME...
|
||
</code></pre>
|
||
<p>Create a FIFO with the given name.</p>
|
||
<h2 id="options-48"><a class="header" href="#options-48">Options</a></h2>
|
||
<dl><dt><code>--mode=<MODE></code>, <code>-m <MODE></code></dt>
|
||
<dd>
|
||
<p>file permissions for the fifo</p>
|
||
</dd>
|
||
<dt><code>-Z</code></dt>
|
||
<dd>
|
||
<p>set the SELinux security context to default type</p>
|
||
</dd>
|
||
<dt><code>--context=<CTX></code></dt>
|
||
<dd>
|
||
<p>like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-47"><a class="header" href="#examples-47">Examples</a></h2>
|
||
<p>Create a named pipe at a given path:</p>
|
||
<pre><code class="language-shell">mkfifo {{path/to/pipe}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="mknod"><a class="header" href="#mknod">mknod</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>mknod [OPTION]... NAME TYPE [MAJOR MINOR]
|
||
</code></pre>
|
||
<p>Create the special file NAME of the given TYPE.</p>
|
||
<h2 id="options-49"><a class="header" href="#options-49">Options</a></h2>
|
||
<dl><dt><code>--mode=<MODE></code>, <code>-m <MODE></code></dt>
|
||
<dd>
|
||
<p>set file permission bits to MODE, not a=rw - umask</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>name of the new file</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>type of the new file (b, c, u or p)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>major file type</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>minor file type</p>
|
||
</dd>
|
||
</dl>
|
||
<p>Mandatory arguments to long options are mandatory for short options too.
|
||
<code>-m</code>, <code>--mode=MODE</code> set file permission bits to <code>MODE</code>, not <code>a=rw - umask</code></p>
|
||
<p>Both <code>MAJOR</code> and <code>MINOR</code> must be specified when <code>TYPE</code> is <code>b</code>, <code>c</code>, or <code>u</code>, and they
|
||
must be omitted when <code>TYPE</code> is <code>p</code>. If <code>MAJOR</code> or <code>MINOR</code> begins with <code>0x</code> or <code>0X</code>,
|
||
it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal;
|
||
otherwise, as decimal. <code>TYPE</code> may be:</p>
|
||
<ul>
|
||
<li><code>b</code> create a block (buffered) special file</li>
|
||
<li><code>c</code>, <code>u</code> create a character (unbuffered) special file</li>
|
||
<li><code>p</code> create a FIFO</li>
|
||
</ul>
|
||
<p>NOTE: your shell may have its own version of mknod, which usually supersedes
|
||
the version described here. Please refer to your shell's documentation
|
||
for details about the options it supports.</p>
|
||
<h2 id="examples-48"><a class="header" href="#examples-48">Examples</a></h2>
|
||
<p>Create a block device:</p>
|
||
<pre><code class="language-shell">sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}
|
||
</code></pre>
|
||
<p>Create a character device:</p>
|
||
<pre><code class="language-shell">sudo mknod {{path/to/device_file}} c {{major_device_number}} {{minor_device_number}}
|
||
</code></pre>
|
||
<p>Create a FIFO (queue) device:</p>
|
||
<pre><code class="language-shell">sudo mknod {{path/to/device_file}} p
|
||
</code></pre>
|
||
<p>Create a device file with default SELinux security context:</p>
|
||
<pre><code class="language-shell">sudo mknod -Z {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="mktemp"><a class="header" href="#mktemp">mktemp</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>mktemp [OPTION]... [TEMPLATE]
|
||
</code></pre>
|
||
<p>Create a temporary file or directory.</p>
|
||
<h2 id="options-50"><a class="header" href="#options-50">Options</a></h2>
|
||
<dl><dt><code>--directory</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Make a directory instead of a file</p>
|
||
</dd>
|
||
<dt><code>--dry-run</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>do not create anything; merely print a name (unsafe)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Fail silently if an error occurs.</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code></dt>
|
||
<dd>
|
||
<p>append SUFFIX to TEMPLATE; SUFFIX must not contain a path separator. This option is implied if TEMPLATE does not end with X.</p>
|
||
</dd>
|
||
<dt><code>--tmpdir=<DIR></code>, <code>-p <DIR></code></dt>
|
||
<dd>
|
||
<p>interpret TEMPLATE relative to DIR; if DIR is not specified, use $TMPDIR ($TMP on windows) if set, else /tmp. With this option, TEMPLATE must not be an absolute name; unlike with -t, TEMPLATE may contain slashes, but mktemp creates only the final component</p>
|
||
</dd>
|
||
<dt><code>-t</code></dt>
|
||
<dd>
|
||
<p>Generate a template (using the supplied prefix and TMPDIR (TMP on windows) if set) to create a filename template [deprecated]</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-49"><a class="header" href="#examples-49">Examples</a></h2>
|
||
<p>Create an empty temporary file and print the absolute path to it:</p>
|
||
<pre><code class="language-shell">mktemp
|
||
</code></pre>
|
||
<p>Create an empty temporary file with a given suffix and print the absolute path to file:</p>
|
||
<pre><code class="language-shell">mktemp --suffix "{{.ext}}"
|
||
</code></pre>
|
||
<p>Create a temporary directory and print the absolute path to it:</p>
|
||
<pre><code class="language-shell">mktemp -d
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="more-1"><a class="header" href="#more-1">more</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>more [OPTIONS] <FILE>...
|
||
</code></pre>
|
||
<p>Display the contents of a text file</p>
|
||
<h2 id="options-51"><a class="header" href="#options-51">Options</a></h2>
|
||
<dl><dt><code>--print-over</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>Do not scroll, display text and clean line ends</p>
|
||
</dd>
|
||
<dt><code>--silent</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Display help instead of ringing bell</p>
|
||
</dd>
|
||
<dt><code>--clean-print</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>Do not scroll, clean screen and display text</p>
|
||
</dd>
|
||
<dt><code>--squeeze</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>Squeeze multiple blank lines into one</p>
|
||
</dd>
|
||
<dt><code>--lines=<number></code>, <code>-n <number></code></dt>
|
||
<dd>
|
||
<p>The number of lines per screen full</p>
|
||
</dd>
|
||
<dt><code>--number</code></dt>
|
||
<dd>
|
||
<p>Same as --lines</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>Path to the files to be read</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-50"><a class="header" href="#examples-50">Examples</a></h2>
|
||
<p>Open a file:</p>
|
||
<pre><code class="language-shell">more {{path/to/file}}
|
||
</code></pre>
|
||
<p>Open a file displaying from a specific line:</p>
|
||
<pre><code class="language-shell">more +{{line_number}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display help:</p>
|
||
<pre><code class="language-shell">more --help
|
||
</code></pre>
|
||
<p>Go to the next page:</p>
|
||
<pre><code class="language-shell"><Space>
|
||
</code></pre>
|
||
<p>Search for a string (press <code>n</code> to go to the next match):</p>
|
||
<pre><code class="language-shell">/{{something}}
|
||
</code></pre>
|
||
<p>Exit:</p>
|
||
<pre><code class="language-shell">q
|
||
</code></pre>
|
||
<p>Display help about interactive commands:</p>
|
||
<pre><code class="language-shell">h
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="mv-1"><a class="header" href="#mv-1">mv</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>mv [OPTION]... [-T] SOURCE DEST
|
||
mv [OPTION]... SOURCE... DIRECTORY
|
||
mv [OPTION]... -t DIRECTORY SOURCE...
|
||
</code></pre>
|
||
<p>Move <code>SOURCE</code> to <code>DEST</code>, or multiple <code>SOURCE</code>(s) to <code>DIRECTORY</code>.</p>
|
||
<h2 id="options-52"><a class="header" href="#options-52">Options</a></h2>
|
||
<dl><dt><code>--force</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>do not prompt before overwriting</p>
|
||
</dd>
|
||
<dt><code>--interactive</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>prompt before override</p>
|
||
</dd>
|
||
<dt><code>--no-clobber</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>do not overwrite an existing file</p>
|
||
</dd>
|
||
<dt><code>--strip-trailing-slashes</code></dt>
|
||
<dd>
|
||
<p>remove any trailing slashes from each SOURCE argument</p>
|
||
</dd>
|
||
<dt><code>--backup=<CONTROL></code></dt>
|
||
<dd>
|
||
<p>make a backup of each existing destination file</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>like --backup but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code>, <code>-S <SUFFIX></code></dt>
|
||
<dd>
|
||
<p>override the usual backup suffix</p>
|
||
</dd>
|
||
<dt><code>--update</code></dt>
|
||
<dd>
|
||
<p>move only when the SOURCE file is newer than the destination file or when the destination file is missing</p>
|
||
</dd>
|
||
<dt><code>-u</code></dt>
|
||
<dd>
|
||
<p>like --update but does not accept an argument</p>
|
||
</dd>
|
||
<dt><code>--target-directory=<DIRECTORY></code>, <code>-t <DIRECTORY></code></dt>
|
||
<dd>
|
||
<p>move all SOURCE arguments into DIRECTORY</p>
|
||
</dd>
|
||
<dt><code>--no-target-directory</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>treat DEST as a normal file</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>explain what is being done</p>
|
||
</dd>
|
||
<dt><code>--progress</code>, <code>-g</code></dt>
|
||
<dd>
|
||
<p>Display a progress bar. <br />Note: this feature is not supported by GNU coreutils.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>When specifying more than one of -i, -f, -n, only the final one will take effect.</p>
|
||
<p>Do not move a non-directory that has an existing destination with the same or newer modification timestamp;
|
||
instead, silently skip the file without failing. If the move is across file system boundaries, the comparison is
|
||
to the source timestamp truncated to the resolutions of the destination file system and of the system calls used
|
||
to update timestamps; this avoids duplicate work if several <code>mv -u</code> commands are executed with the same source
|
||
and destination. This option is ignored if the <code>-n</code> or <code>--no-clobber</code> option is also specified. which gives more control
|
||
over which existing files in the destination are replaced, and its value can be one of the following:</p>
|
||
<ul>
|
||
<li><code>all</code> This is the default operation when an <code>--update</code> option is not specified, and results in all existing files in the destination being replaced.</li>
|
||
<li><code>none</code> This is similar to the <code>--no-clobber</code> option, in that no files in the destination are replaced, but also skipping a file does not induce a failure.</li>
|
||
<li><code>older</code> This is the default operation when <code>--update</code> is specified, and results in files being replaced if they’re older than the corresponding source file.</li>
|
||
</ul>
|
||
<h2 id="examples-51"><a class="header" href="#examples-51">Examples</a></h2>
|
||
<p>Rename a file or directory when the target is not an existing directory:</p>
|
||
<pre><code class="language-shell">mv {{path/to/source}} {{path/to/target}}
|
||
</code></pre>
|
||
<p>Move a file or directory into an existing directory:</p>
|
||
<pre><code class="language-shell">mv {{path/to/source}} {{path/to/existing_directory}}
|
||
</code></pre>
|
||
<p>Move multiple files into an existing directory, keeping the filenames unchanged:</p>
|
||
<pre><code class="language-shell">mv {{path/to/source1 path/to/source2 ...}} {{path/to/existing_directory}}
|
||
</code></pre>
|
||
<p>Do not prompt for confirmation before overwriting existing files:</p>
|
||
<pre><code class="language-shell">mv -f {{path/to/source}} {{path/to/target}}
|
||
</code></pre>
|
||
<p>Prompt for confirmation before overwriting existing files, regardless of file permissions:</p>
|
||
<pre><code class="language-shell">mv -i {{path/to/source}} {{path/to/target}}
|
||
</code></pre>
|
||
<p>Do not overwrite existing files at the target:</p>
|
||
<pre><code class="language-shell">mv -n {{path/to/source}} {{path/to/target}}
|
||
</code></pre>
|
||
<p>Move files in verbose mode, showing files after they are moved:</p>
|
||
<pre><code class="language-shell">mv -v {{path/to/source}} {{path/to/target}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="nice"><a class="header" href="#nice">nice</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>nice [OPTIONS] [COMMAND [ARGS]]
|
||
</code></pre>
|
||
<p>Run <code>COMMAND</code> with an adjusted niceness, which affects process scheduling.
|
||
With no <code>COMMAND</code>, print the current niceness. Niceness values range from at
|
||
least -20 (most favorable to the process) to 19 (least favorable to the
|
||
process).</p>
|
||
<h2 id="options-53"><a class="header" href="#options-53">Options</a></h2>
|
||
<dl><dt><code>--adjustment</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>add N to the niceness (default is 10)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-52"><a class="header" href="#examples-52">Examples</a></h2>
|
||
<p>Launch a program with altered priority:</p>
|
||
<pre><code class="language-shell">nice -n {{niceness_value}} {{command}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="nl"><a class="header" href="#nl">nl</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>nl [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Number lines of files</p>
|
||
<h2 id="options-54"><a class="header" href="#options-54">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--body-numbering=<SYNTAX></code>, <code>-b <SYNTAX></code></dt>
|
||
<dd>
|
||
<p>use STYLE for numbering body lines</p>
|
||
</dd>
|
||
<dt><code>--section-delimiter=<CC></code>, <code>-d <CC></code></dt>
|
||
<dd>
|
||
<p>use CC for separating logical pages</p>
|
||
</dd>
|
||
<dt><code>--footer-numbering=<STYLE></code>, <code>-f <STYLE></code></dt>
|
||
<dd>
|
||
<p>use STYLE for numbering footer lines</p>
|
||
</dd>
|
||
<dt><code>--header-numbering=<STYLE></code>, <code>-h <STYLE></code></dt>
|
||
<dd>
|
||
<p>use STYLE for numbering header lines</p>
|
||
</dd>
|
||
<dt><code>--line-increment=<NUMBER></code>, <code>-i <NUMBER></code></dt>
|
||
<dd>
|
||
<p>line number increment at each line</p>
|
||
</dd>
|
||
<dt><code>--join-blank-lines=<NUMBER></code>, <code>-l <NUMBER></code></dt>
|
||
<dd>
|
||
<p>group of NUMBER empty lines counted as one</p>
|
||
</dd>
|
||
<dt><code>--number-format=<FORMAT></code>, <code>-n <FORMAT></code></dt>
|
||
<dd>
|
||
<p>insert line numbers according to FORMAT</p>
|
||
</dd>
|
||
<dt><code>--no-renumber</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>do not reset line numbers at logical pages</p>
|
||
</dd>
|
||
<dt><code>--number-separator=<STRING></code>, <code>-s <STRING></code></dt>
|
||
<dd>
|
||
<p>add STRING after (possible) line number</p>
|
||
</dd>
|
||
<dt><code>--starting-line-number=<NUMBER></code>, <code>-v <NUMBER></code></dt>
|
||
<dd>
|
||
<p>first line number on each logical page</p>
|
||
</dd>
|
||
<dt><code>--number-width=<NUMBER></code>, <code>-w <NUMBER></code></dt>
|
||
<dd>
|
||
<p>use NUMBER columns for line numbers</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-53"><a class="header" href="#examples-53">Examples</a></h2>
|
||
<p>Number non-blank lines in a file:</p>
|
||
<pre><code class="language-shell">nl {{path/to/file}}
|
||
</code></pre>
|
||
<p>Read from standard output:</p>
|
||
<pre><code class="language-shell">cat {{path/to/file}} | nl {{options}} -
|
||
</code></pre>
|
||
<p>Number only the lines with printable text:</p>
|
||
<pre><code class="language-shell">nl -t {{path/to/file}}
|
||
</code></pre>
|
||
<p>Number all lines including blank lines:</p>
|
||
<pre><code class="language-shell">nl -b a {{path/to/file}}
|
||
</code></pre>
|
||
<p>Number only the body lines that match a basic regular expression (BRE) pattern:</p>
|
||
<pre><code class="language-shell">nl -b p'FooBar[0-9]' {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="nohup"><a class="header" href="#nohup">nohup</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>nohup COMMAND [ARG]...
|
||
nohup FLAG
|
||
</code></pre>
|
||
<p>Run COMMAND ignoring hangup signals.</p>
|
||
<h2 id="options-55"><a class="header" href="#options-55">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>If standard input is terminal, it'll be replaced with /dev/null.
|
||
If standard output is terminal, it'll be appended to nohup.out instead,
|
||
or $HOME/nohup.out, if nohup.out open failed.
|
||
If standard error is terminal, it'll be redirected to stdout.</p>
|
||
<h2 id="examples-54"><a class="header" href="#examples-54">Examples</a></h2>
|
||
<p>Run a process that can live beyond the terminal:</p>
|
||
<pre><code class="language-shell">nohup {{command}} {{argument1 argument2 ...}}
|
||
</code></pre>
|
||
<p>Launch <code>nohup</code> in background mode:</p>
|
||
<pre><code class="language-shell">nohup {{command}} {{argument1 argument2 ...}} &
|
||
</code></pre>
|
||
<p>Run a shell script that can live beyond the terminal:</p>
|
||
<pre><code class="language-shell">nohup {{path/to/script.sh}} &
|
||
</code></pre>
|
||
<p>Run a process and write the output to a specific file:</p>
|
||
<pre><code class="language-shell">nohup {{command}} {{argument1 argument2 ...}} > {{path/to/output_file}} &
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="nproc"><a class="header" href="#nproc">nproc</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>nproc [OPTIONS]...
|
||
</code></pre>
|
||
<p>Print the number of cores available to the current process.
|
||
If the <code>OMP_NUM_THREADS</code> or <code>OMP_THREAD_LIMIT</code> environment variables are set, then
|
||
they will determine the minimum and maximum returned value respectively.</p>
|
||
<h2 id="options-56"><a class="header" href="#options-56">Options</a></h2>
|
||
<dl><dt><code>--all</code></dt>
|
||
<dd>
|
||
<p>print the number of cores available to the system</p>
|
||
</dd>
|
||
<dt><code>--ignore=<N></code></dt>
|
||
<dd>
|
||
<p>ignore up to N cores</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-55"><a class="header" href="#examples-55">Examples</a></h2>
|
||
<p>Display the number of available processing units:</p>
|
||
<pre><code class="language-shell">nproc
|
||
</code></pre>
|
||
<p>Display the number of installed processing units, including any inactive ones:</p>
|
||
<pre><code class="language-shell">nproc --all
|
||
</code></pre>
|
||
<p>If possible, subtract a given number of units from the returned value:</p>
|
||
<pre><code class="language-shell">nproc --ignore {{count}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="numfmt"><a class="header" href="#numfmt">numfmt</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>numfmt [OPTION]... [NUMBER]...
|
||
</code></pre>
|
||
<p>Convert numbers from/to human-readable strings</p>
|
||
<h2 id="options-57"><a class="header" href="#options-57">Options</a></h2>
|
||
<dl><dt><code>--delimiter=<X></code>, <code>-d <X></code></dt>
|
||
<dd>
|
||
<p>use X instead of whitespace for field delimiter</p>
|
||
</dd>
|
||
<dt><code>--field=<FIELDS></code></dt>
|
||
<dd>
|
||
<p>replace the numbers in these input fields; see FIELDS below</p>
|
||
</dd>
|
||
<dt><code>--format=<FORMAT></code></dt>
|
||
<dd>
|
||
<p>use printf style floating-point FORMAT; see FORMAT below for details</p>
|
||
</dd>
|
||
<dt><code>--from=<UNIT></code></dt>
|
||
<dd>
|
||
<p>auto-scale input numbers to UNITs; see UNIT below</p>
|
||
</dd>
|
||
<dt><code>--from-unit=<N></code></dt>
|
||
<dd>
|
||
<p>specify the input unit size</p>
|
||
</dd>
|
||
<dt><code>--to=<UNIT></code></dt>
|
||
<dd>
|
||
<p>auto-scale output numbers to UNITs; see UNIT below</p>
|
||
</dd>
|
||
<dt><code>--to-unit=<N></code></dt>
|
||
<dd>
|
||
<p>the output unit size</p>
|
||
</dd>
|
||
<dt><code>--padding=<N></code></dt>
|
||
<dd>
|
||
<p>pad the output to N characters; positive N will right-align; negative N will left-align; padding is ignored if the output is wider than N; the default is to automatically pad if a whitespace is found</p>
|
||
</dd>
|
||
<dt><code>--header=<N></code></dt>
|
||
<dd>
|
||
<p>print (without converting) the first N header lines; N defaults to 1 if not specified</p>
|
||
</dd>
|
||
<dt><code>--round=<METHOD></code></dt>
|
||
<dd>
|
||
<p>use METHOD for rounding when scaling; METHOD can be: up,down, from-zero, towards-zero, nearest</p>
|
||
</dd>
|
||
<dt><code>--suffix=<SUFFIX></code></dt>
|
||
<dd>
|
||
<p>print SUFFIX after each formatted number, and accept inputs optionally ending with SUFFIX</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p><code>UNIT</code> options:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>none</code>: no auto-scaling is done; suffixes will trigger an error</p>
|
||
</li>
|
||
<li>
|
||
<p><code>auto</code>: accept optional single/two letter suffix:</p>
|
||
<p>1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576,</p>
|
||
</li>
|
||
<li>
|
||
<p><code>si</code>: accept optional single letter suffix:</p>
|
||
<p>1K = 1000, 1M = 1000000, ...</p>
|
||
</li>
|
||
<li>
|
||
<p><code>iec</code>: accept optional single letter suffix:</p>
|
||
<p>1K = 1024, 1M = 1048576, ...</p>
|
||
</li>
|
||
<li>
|
||
<p><code>iec-i</code>: accept optional two-letter suffix:</p>
|
||
<p>1Ki = 1024, 1Mi = 1048576, ...</p>
|
||
</li>
|
||
<li>
|
||
<p><code>FIELDS</code> supports <code>cut(1)</code> style field ranges:</p>
|
||
<p>N N'th field, counted from 1
|
||
N- from N'th field, to end of line
|
||
N-M from N'th to M'th field (inclusive)
|
||
-M from first to M'th field (inclusive)</p>
|
||
<ul>
|
||
<li>all fields</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>Multiple fields/ranges can be separated with commas</p>
|
||
<p><code>FORMAT</code> must be suitable for printing one floating-point argument <code>%f</code>.
|
||
Optional quote (<code>%'f</code>) will enable --grouping (if supported by current locale).
|
||
Optional width value (<code>%10f</code>) will pad output. Optional zero (<code>%010f</code>) width
|
||
will zero pad the number. Optional negative values (<code>%-10f</code>) will left align.
|
||
Optional precision (<code>%.1f</code>) will override the input determined precision.</p>
|
||
<h2 id="examples-56"><a class="header" href="#examples-56">Examples</a></h2>
|
||
<p>Convert 1.5K (SI Units) to 1500:</p>
|
||
<pre><code class="language-shell">numfmt --from={{si}} {{1.5K}}
|
||
</code></pre>
|
||
<p>Convert 5th field (1-indexed) to IEC Units without converting header:</p>
|
||
<pre><code class="language-shell">ls -l | numfmt --header={{1}} --field={{5}} --to={{iec}}
|
||
</code></pre>
|
||
<p>Convert to IEC units, pad with 5 characters, left aligned:</p>
|
||
<pre><code class="language-shell">du -s * | numfmt --to={{iec}} --format="{{%-5f}}"
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="od"><a class="header" href="#od">od</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>od [OPTION]... [--] [FILENAME]...
|
||
od [-abcdDefFhHiIlLoOsxX] [FILENAME] [[+][0x]OFFSET[.][b]]
|
||
od --traditional [OPTION]... [FILENAME] [[+][0x]OFFSET[.][b] [[+][0x]LABEL[.][b]]]
|
||
</code></pre>
|
||
<p>Dump files in octal and other formats</p>
|
||
<h2 id="options-58"><a class="header" href="#options-58">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--address-radix=<RADIX></code>, <code>-A <RADIX></code></dt>
|
||
<dd>
|
||
<p>Select the base in which file offsets are printed.</p>
|
||
</dd>
|
||
<dt><code>--skip-bytes=<BYTES></code>, <code>-j <BYTES></code></dt>
|
||
<dd>
|
||
<p>Skip bytes input bytes before formatting and writing.</p>
|
||
</dd>
|
||
<dt><code>--read-bytes=<BYTES></code>, <code>-N <BYTES></code></dt>
|
||
<dd>
|
||
<p>limit dump to BYTES input bytes</p>
|
||
</dd>
|
||
<dt><code>--endian=<big|little></code></dt>
|
||
<dd>
|
||
<p>byte order to use for multi-byte formats</p>
|
||
</dd>
|
||
<dt><code>--strings=<BYTES></code>, <code>-S <BYTES></code></dt>
|
||
<dd>
|
||
<p>NotImplemented: output strings of at least BYTES graphic chars. 3 is assumed when BYTES is not specified.</p>
|
||
</dd>
|
||
<dt><code>-a</code></dt>
|
||
<dd>
|
||
<p>named characters, ignoring high-order bit</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>octal bytes</p>
|
||
</dd>
|
||
<dt><code>-c</code></dt>
|
||
<dd>
|
||
<p>ASCII characters or backslash escapes</p>
|
||
</dd>
|
||
<dt><code>-d</code></dt>
|
||
<dd>
|
||
<p>unsigned decimal 2-byte units</p>
|
||
</dd>
|
||
<dt><code>-D</code></dt>
|
||
<dd>
|
||
<p>unsigned decimal 4-byte units</p>
|
||
</dd>
|
||
<dt><code>-o</code></dt>
|
||
<dd>
|
||
<p>octal 2-byte units</p>
|
||
</dd>
|
||
<dt><code>-I</code></dt>
|
||
<dd>
|
||
<p>decimal 8-byte units</p>
|
||
</dd>
|
||
<dt><code>-L</code></dt>
|
||
<dd>
|
||
<p>decimal 8-byte units</p>
|
||
</dd>
|
||
<dt><code>-i</code></dt>
|
||
<dd>
|
||
<p>decimal 4-byte units</p>
|
||
</dd>
|
||
<dt><code>-l</code></dt>
|
||
<dd>
|
||
<p>decimal 8-byte units</p>
|
||
</dd>
|
||
<dt><code>-x</code></dt>
|
||
<dd>
|
||
<p>hexadecimal 2-byte units</p>
|
||
</dd>
|
||
<dt><code>-h</code></dt>
|
||
<dd>
|
||
<p>hexadecimal 2-byte units</p>
|
||
</dd>
|
||
<dt><code>-O</code></dt>
|
||
<dd>
|
||
<p>octal 4-byte units</p>
|
||
</dd>
|
||
<dt><code>-s</code></dt>
|
||
<dd>
|
||
<p>decimal 2-byte units</p>
|
||
</dd>
|
||
<dt><code>-X</code></dt>
|
||
<dd>
|
||
<p>hexadecimal 4-byte units</p>
|
||
</dd>
|
||
<dt><code>-H</code></dt>
|
||
<dd>
|
||
<p>hexadecimal 4-byte units</p>
|
||
</dd>
|
||
<dt><code>-e</code></dt>
|
||
<dd>
|
||
<p>floating point double precision (64-bit) units</p>
|
||
</dd>
|
||
<dt><code>-f</code></dt>
|
||
<dd>
|
||
<p>floating point double precision (32-bit) units</p>
|
||
</dd>
|
||
<dt><code>-F</code></dt>
|
||
<dd>
|
||
<p>floating point double precision (64-bit) units</p>
|
||
</dd>
|
||
<dt><code>--format=<TYPE></code>, <code>-t <TYPE></code></dt>
|
||
<dd>
|
||
<p>select output format or formats</p>
|
||
</dd>
|
||
<dt><code>--output-duplicates</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>do not use * to mark line suppression</p>
|
||
</dd>
|
||
<dt><code>--width=<BYTES></code>, <code>-w <BYTES></code></dt>
|
||
<dd>
|
||
<p>output BYTES bytes per output line. 32 is implied when BYTES is not specified.</p>
|
||
</dd>
|
||
<dt><code>--traditional</code></dt>
|
||
<dd>
|
||
<p>compatibility mode with one input, offset and label.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Displays data in various human-readable formats. If multiple formats are
|
||
specified, the output will contain all formats in the order they appear on the
|
||
command line. Each format will be printed on a new line. Only the line
|
||
containing the first format will be prefixed with the offset.</p>
|
||
<p>If no filename is specified, or it is "-", stdin will be used. After a "--", no
|
||
more options will be recognized. This allows for filenames starting with a "-".</p>
|
||
<p>If a filename is a valid number which can be used as an offset in the second
|
||
form, you can force it to be recognized as a filename if you include an option
|
||
like "-j0", which is only valid in the first form.</p>
|
||
<p>RADIX is one of o,d,x,n for octal, decimal, hexadecimal or none.</p>
|
||
<p>BYTES is decimal by default, octal if prefixed with a "0", or hexadecimal if
|
||
prefixed with "0x". The suffixes b, KB, K, MB, M, GB, G, will multiply the
|
||
number with 512, 1000, 1024, 1000^2, 1024^2, 1000^3, 1024^3, 1000^2, 1024^2.</p>
|
||
<p>OFFSET and LABEL are octal by default, hexadecimal if prefixed with "0x" or
|
||
decimal if a "." suffix is added. The "b" suffix will multiply with 512.</p>
|
||
<p>TYPE contains one or more format specifications consisting of:
|
||
a for printable 7-bits ASCII
|
||
c for utf-8 characters or octal for undefined characters
|
||
d[SIZE] for signed decimal
|
||
f[SIZE] for floating point
|
||
o[SIZE] for octal
|
||
u[SIZE] for unsigned decimal
|
||
x[SIZE] for hexadecimal
|
||
SIZE is the number of bytes which can be the number 1, 2, 4, 8 or 16,
|
||
or C, I, S, L for 1, 2, 4, 8 bytes for integer types,
|
||
or F, D, L for 4, 8, 16 bytes for floating point.
|
||
Any type specification can have a "z" suffix, which will add a ASCII dump at
|
||
the end of the line.</p>
|
||
<p>If an error occurred, a diagnostic message will be printed to stderr, and the
|
||
exit code will be non-zero.</p>
|
||
<h2 id="examples-57"><a class="header" href="#examples-57">Examples</a></h2>
|
||
<p>Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with <code>*</code>:</p>
|
||
<pre><code class="language-shell">od {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display file in verbose mode, i.e. without replacing duplicate lines with <code>*</code>:</p>
|
||
<pre><code class="language-shell">od -v {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display file in hexadecimal format (2-byte units), with byte offsets in decimal format:</p>
|
||
<pre><code class="language-shell">od --format={{x}} --address-radix={{d}} -v {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display file in hexadecimal format (1-byte units), and 4 bytes per line:</p>
|
||
<pre><code class="language-shell">od --format={{x1}} --width={{4}} -v {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display file in hexadecimal format along with its character representation, and do not print byte offsets:</p>
|
||
<pre><code class="language-shell">od --format={{xz}} --address-radix={{n}} -v {{path/to/file}}
|
||
</code></pre>
|
||
<p>Read only 100 bytes of a file starting from the 500th byte:</p>
|
||
<pre><code class="language-shell">od --read-bytes {{100}} --skip-bytes={{500}} -v {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="paste"><a class="header" href="#paste">paste</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>paste [OPTIONS] [FILE]...
|
||
</code></pre>
|
||
<p>Write lines consisting of the sequentially corresponding lines from each
|
||
<code>FILE</code>, separated by <code>TAB</code>s, to standard output.</p>
|
||
<h2 id="options-59"><a class="header" href="#options-59">Options</a></h2>
|
||
<dl><dt><code>--serial</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>paste one file at a time instead of in parallel</p>
|
||
</dd>
|
||
<dt><code>--delimiters=<LIST></code>, <code>-d <LIST></code></dt>
|
||
<dd>
|
||
<p>reuse characters from LIST instead of TABs</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-58"><a class="header" href="#examples-58">Examples</a></h2>
|
||
<p>Join all the lines into a single line, using TAB as delimiter:</p>
|
||
<pre><code class="language-shell">paste -s {{path/to/file}}
|
||
</code></pre>
|
||
<p>Join all the lines into a single line, using the specified delimiter:</p>
|
||
<pre><code class="language-shell">paste -s -d {{delimiter}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Merge two files side by side, each in its column, using TAB as delimiter:</p>
|
||
<pre><code class="language-shell">paste {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Merge two files side by side, each in its column, using the specified delimiter:</p>
|
||
<pre><code class="language-shell">paste -d {{delimiter}} {{file1}} {{file2}}
|
||
</code></pre>
|
||
<p>Merge two files, with lines added alternatively:</p>
|
||
<pre><code class="language-shell">paste -d '\n' {{file1}} {{file2}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="pathchk"><a class="header" href="#pathchk">pathchk</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>pathchk [OPTION]... NAME...
|
||
</code></pre>
|
||
<p>Check whether file names are valid or portable</p>
|
||
<h2 id="options-60"><a class="header" href="#options-60">Options</a></h2>
|
||
<dl><dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>check for most POSIX systems</p>
|
||
</dd>
|
||
<dt><code>-P</code></dt>
|
||
<dd>
|
||
<p>check for empty names and leading "-"</p>
|
||
</dd>
|
||
<dt><code>--portability</code></dt>
|
||
<dd>
|
||
<p>check for all POSIX systems (equivalent to -p -P)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-59"><a class="header" href="#examples-59">Examples</a></h2>
|
||
<p>Check pathnames for validity in the current system:</p>
|
||
<pre><code class="language-shell">pathchk {{path1 path2 …}}
|
||
</code></pre>
|
||
<p>Check pathnames for validity on a wider range of POSIX compliant systems:</p>
|
||
<pre><code class="language-shell">pathchk -p {{path1 path2 …}}
|
||
</code></pre>
|
||
<p>Check pathnames for validity on all POSIX compliant systems:</p>
|
||
<pre><code class="language-shell">pathchk --portability {{path1 path2 …}}
|
||
</code></pre>
|
||
<p>Only check for empty pathnames or leading dashes (-):</p>
|
||
<pre><code class="language-shell">pathchk -P {{path1 path2 …}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="pinky"><a class="header" href="#pinky">pinky</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>pinky [OPTION]... [USER]...
|
||
</code></pre>
|
||
<p>Displays brief user information on Unix-based systems</p>
|
||
<h2 id="options-61"><a class="header" href="#options-61">Options</a></h2>
|
||
<dl><dt><code>-l</code></dt>
|
||
<dd>
|
||
<p>produce long format output for the specified USERs</p>
|
||
</dd>
|
||
<dt><code>-b</code></dt>
|
||
<dd>
|
||
<p>omit the user's home directory and shell in long format</p>
|
||
</dd>
|
||
<dt><code>-h</code></dt>
|
||
<dd>
|
||
<p>omit the user's project file in long format</p>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>omit the user's plan file in long format</p>
|
||
</dd>
|
||
<dt><code>-s</code></dt>
|
||
<dd>
|
||
<p>do short format output, this is the default</p>
|
||
</dd>
|
||
<dt><code>-f</code></dt>
|
||
<dd>
|
||
<p>omit the line of column headings in short format</p>
|
||
</dd>
|
||
<dt><code>-w</code></dt>
|
||
<dd>
|
||
<p>omit the user's full name in short format</p>
|
||
</dd>
|
||
<dt><code>-i</code></dt>
|
||
<dd>
|
||
<p>omit the user's full name and remote host in short format</p>
|
||
</dd>
|
||
<dt><code>-q</code></dt>
|
||
<dd>
|
||
<p>omit the user's full name, remote host and idle time in short format</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-60"><a class="header" href="#examples-60">Examples</a></h2>
|
||
<p>Display details about the current user:</p>
|
||
<pre><code class="language-shell">pinky
|
||
</code></pre>
|
||
<p>Display details for a specific user:</p>
|
||
<pre><code class="language-shell">pinky {{user}}
|
||
</code></pre>
|
||
<p>Display details in the long format:</p>
|
||
<pre><code class="language-shell">pinky {{user}} -l
|
||
</code></pre>
|
||
<p>Omit the user's home directory and shell in long format:</p>
|
||
<pre><code class="language-shell">pinky {{user}} -lb
|
||
</code></pre>
|
||
<p>Omit the user's project file in long format:</p>
|
||
<pre><code class="language-shell">pinky {{user}} -lh
|
||
</code></pre>
|
||
<p>Omit the column headings in short format:</p>
|
||
<pre><code class="language-shell">pinky {{user}} -f
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="pr"><a class="header" href="#pr">pr</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>pr [OPTIONS] [files]...
|
||
</code></pre>
|
||
<p>Write content of given file or standard input to standard output with pagination filter</p>
|
||
<h2 id="options-62"><a class="header" href="#options-62">Options</a></h2>
|
||
<dl><dt><code>--pages=<FIRST_PAGE[:LAST_PAGE]></code></dt>
|
||
<dd>
|
||
<p>Begin and stop printing with page FIRST_PAGE[:LAST_PAGE]</p>
|
||
</dd>
|
||
<dt><code>--header=<STRING></code>, <code>-h <STRING></code></dt>
|
||
<dd>
|
||
<p>Use the string header to replace the file name in the header line.</p>
|
||
</dd>
|
||
<dt><code>--double-space</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Produce output that is double spaced. An extra <newline> character is output following every <newline> found in the input.</p>
|
||
</dd>
|
||
<dt><code>--number-lines=<[char][width]></code>, <code>-n <[char][width]></code></dt>
|
||
<dd>
|
||
<p>Provide width digit line numbering. The default for width, if not specified, is 5. The number occupies the first width column positions of each text column or each line of -m output. If char (any non-digit character) is given, it is appended to the line number to separate it from whatever follows. The default for char is a <tab>. Line numbers longer than width columns are truncated.</p>
|
||
</dd>
|
||
<dt><code>--first-line-number=<NUMBER></code>, <code>-N <NUMBER></code></dt>
|
||
<dd>
|
||
<p>start counting with NUMBER at 1st line of first page printed</p>
|
||
</dd>
|
||
<dt><code>--omit-header</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>Write neither the five-line identifying header nor the five-line trailer usually supplied for each page. Quit writing after the last line of each file without spacing to the end of the page.</p>
|
||
</dd>
|
||
<dt><code>--length=<PAGE_LENGTH></code>, <code>-l <PAGE_LENGTH></code></dt>
|
||
<dd>
|
||
<p>Override the 66-line default (default number of lines of text 56, and with -F 63) and reset the page length to lines. If lines is not greater than the sum of both the header and trailer depths (in lines), the pr utility shall suppress both the header and trailer, as if the -t option were in effect. </p>
|
||
</dd>
|
||
<dt><code>--no-file-warnings</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>omit warning when a file cannot be opened</p>
|
||
</dd>
|
||
<dt><code>--form-feed</code>, <code>-F</code></dt>
|
||
<dd>
|
||
<p>Use a <form-feed> for new pages, instead of the default behavior that uses a sequence of <newline>s.</p>
|
||
</dd>
|
||
<dt><code>--width=<width></code>, <code>-w <width></code></dt>
|
||
<dd>
|
||
<p>Set the width of the line to width column positions for multiple text-column output only. If the -w option is not specified and the -s option is not specified, the default width shall be 72. If the -w option is not specified and the -s option is specified, the default width shall be 512.</p>
|
||
</dd>
|
||
<dt><code>--page-width=<width></code>, <code>-W <width></code></dt>
|
||
<dd>
|
||
<p>set page width to PAGE_WIDTH (72) characters always, truncate lines, except -J option is set, no interference with -S or -s</p>
|
||
</dd>
|
||
<dt><code>--across</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Modify the effect of the - column option so that the columns are filled across the page in a round-robin order (for example, when column is 2, the first input line heads column 1, the second heads column 2, the third is the second line in column 1, and so on).</p>
|
||
</dd>
|
||
<dt><code>--column=<column></code></dt>
|
||
<dd>
|
||
<p>Produce multi-column output that is arranged in column columns (the default shall be 1) and is written down each column in the order in which the text is received from the input file. This option should not be used with -m. The options -e and -i shall be assumed for multiple text-column output. Whether or not text columns are produced with identical vertical lengths is unspecified, but a text column shall never exceed the length of the page (see the -l option). When used with -t, use the minimum number of lines to write the output.</p>
|
||
</dd>
|
||
<dt><code>--separator=<char></code>, <code>-s <char></code></dt>
|
||
<dd>
|
||
<p>Separate text columns by the single character char instead of by the appropriate number of <space>s (default for char is the <tab> character).</p>
|
||
</dd>
|
||
<dt><code>--sep-string=<string></code>, <code>-S <string></code></dt>
|
||
<dd>
|
||
<p>separate columns by STRING, without -S: Default separator <TAB> with -J and <space> otherwise (same as -S" "), no effect on column options</p>
|
||
</dd>
|
||
<dt><code>--merge</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>Merge files. Standard output shall be formatted so the pr utility writes one line from each file specified by a file operand, side by side into text columns of equal fixed widths, in terms of the number of column positions. Implementations shall support merging of at least nine file operands.</p>
|
||
</dd>
|
||
<dt><code>--indent=<margin></code>, <code>-o <margin></code></dt>
|
||
<dd>
|
||
<p>Each line of output shall be preceded by offset <space>s. If the -o option is not specified, the default offset shall be zero. The space taken is in addition to the output line width (see the -w option below).</p>
|
||
</dd>
|
||
<dt><code>-J</code></dt>
|
||
<dd>
|
||
<p>merge full lines, turns off -W line truncation, no column alignment, --sep-string[=STRING] sets separators</p>
|
||
</dd>
|
||
<dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p><code>+PAGE</code> Begin output at page number page of the formatted input.
|
||
<code>-COLUMN</code> Produce multi-column output. See <code>--column</code></p>
|
||
<p>The pr utility is a printing and pagination filter for text files.
|
||
When multiple input files are specified, each is read, formatted, and written to standard output.
|
||
By default, the input is separated into 66-line pages, each with</p>
|
||
<ul>
|
||
<li>A 5-line header with the page number, date, time, and the pathname of the file.</li>
|
||
<li>A 5-line trailer consisting of blank lines.</li>
|
||
</ul>
|
||
<p>If standard output is associated with a terminal, diagnostic messages are suppressed until the pr
|
||
utility has completed processing.</p>
|
||
<p>When multiple column output is specified, text columns are of equal width.
|
||
By default, text columns are separated by at least one <code><blank></code>.
|
||
Input lines that do not fit into a text column are truncated.
|
||
Lines are not truncated under single column output.</p>
|
||
<h2 id="examples-61"><a class="header" href="#examples-61">Examples</a></h2>
|
||
<p>Print multiple files with a default header and footer:</p>
|
||
<pre><code class="language-shell">pr {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<p>Print with a custom centered header:</p>
|
||
<pre><code class="language-shell">pr -h "{{header}}" {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<p>Print with numbered lines and a custom date format:</p>
|
||
<pre><code class="language-shell">pr -n -D "{{format}}" {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<p>Print all files together, one in each column, without a header or footer:</p>
|
||
<pre><code class="language-shell">pr -m -T {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<p>Print, beginning at page 2 up to page 5, with a given page length (including header and footer):</p>
|
||
<pre><code class="language-shell">pr +{{2}}:{{5}} -l {{page_length}} {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<p>Print with an offset for each line and a truncating custom page width:</p>
|
||
<pre><code class="language-shell">pr -o {{offset}} -W {{width}} {{file1}} {{file2}} {{file3}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="printenv"><a class="header" href="#printenv">printenv</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>printenv [VARIABLE]... [OPTION]...
|
||
</code></pre>
|
||
<p>Display the values of the specified environment VARIABLE(s), or (with no VARIABLE) display name and value pairs for them all.</p>
|
||
<h2 id="options-63"><a class="header" href="#options-63">Options</a></h2>
|
||
<dl><dt><code>--null</code>, <code>-0</code></dt>
|
||
<dd>
|
||
<p>end each output line with 0 byte rather than newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-62"><a class="header" href="#examples-62">Examples</a></h2>
|
||
<p>Display key-value pairs of all environment variables:</p>
|
||
<pre><code class="language-shell">printenv
|
||
</code></pre>
|
||
<p>Display the value of a specific variable:</p>
|
||
<pre><code class="language-shell">printenv {{HOME}}
|
||
</code></pre>
|
||
<p>Display the value of a variable and end with NUL instead of newline:</p>
|
||
<pre><code class="language-shell">printenv --null {{HOME}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="printf"><a class="header" href="#printf">printf</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>printf FORMATSTRING [ARGUMENT]...
|
||
</code></pre>
|
||
<p>Print output based off of the format string and proceeding arguments.</p>
|
||
<h2 id="options-64"><a class="header" href="#options-64">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information</p>
|
||
</dd>
|
||
<dt><code>--version</code></dt>
|
||
<dd>
|
||
<p>Print version information</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>basic anonymous string templating:</p>
|
||
<p>prints format string at least once, repeating as long as there are remaining arguments
|
||
output prints escaped literals in the format string as character literals
|
||
output replaces anonymous fields with the next unused argument, formatted according to the field.</p>
|
||
<p>Prints the <code>,</code> replacing escaped character sequences with character literals
|
||
and substitution field sequences with passed arguments</p>
|
||
<p>literally, with the exception of the below
|
||
escaped character sequences, and the substitution sequences described further down.</p>
|
||
<h3 id="escape-sequences"><a class="header" href="#escape-sequences">ESCAPE SEQUENCES</a></h3>
|
||
<p>The following escape sequences, organized here in alphabetical order,
|
||
will print the corresponding character literal:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>\"</code> double quote</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\\\</code> backslash</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\a</code> alert (BEL)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\b</code> backspace</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\c</code> End-of-Input</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\e</code> escape</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\f</code> form feed</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\n</code> new line</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\r</code> carriage return</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\t</code> horizontal tab</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\v</code> vertical tab</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\NNN</code> byte with value expressed in octal value NNN (1 to 3 digits)
|
||
values greater than 256 will be treated</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\xHH</code> byte with value expressed in hexadecimal value NN (1 to 2 digits)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\uHHHH</code> Unicode (IEC 10646) character with value expressed in hexadecimal value HHHH (4 digits)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>\\uHHHH</code> Unicode character with value expressed in hexadecimal value HHHH (8 digits)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%%</code> a single %</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="substitutions"><a class="header" href="#substitutions">SUBSTITUTIONS</a></h3>
|
||
<h4 id="substitution-quick-reference"><a class="header" href="#substitution-quick-reference">SUBSTITUTION QUICK REFERENCE</a></h4>
|
||
<p>Fields</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>%s</code>: string</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%b</code>: string parsed for literals second parameter is max length</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%c</code>: char no second parameter</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%i</code> or <code>%d</code>: 64-bit integer</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%u</code>: 64 bit unsigned integer</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%x</code> or <code>%X</code>: 64-bit unsigned integer as hex</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%o</code>: 64-bit unsigned integer as octal
|
||
second parameter is min-width, integer
|
||
output below that width is padded with leading zeroes</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%f</code> or <code>%F</code>: decimal floating point value</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%e</code> or <code>%E</code>: scientific notation floating point value</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%g</code> or <code>%G</code>: shorter of specially interpreted decimal or SciNote floating point value.
|
||
second parameter is
|
||
<code>-max</code> places after decimal point for floating point output
|
||
<code>-max</code> number of significant digits for scientific notation output</p>
|
||
</li>
|
||
</ul>
|
||
<p>parameterizing fields</p>
|
||
<p>examples:</p>
|
||
<pre><code>printf '%4.3i' 7
|
||
</code></pre>
|
||
<p>It has a first parameter of 4 and a second parameter of 3 and will result in ' 007'</p>
|
||
<pre><code>printf '%.1s' abcde
|
||
</code></pre>
|
||
<p>It has no first parameter and a second parameter of 1 and will result in 'a'</p>
|
||
<pre><code>printf '%4c' q
|
||
</code></pre>
|
||
<p>It has a first parameter of 4 and no second parameter and will result in ' q'</p>
|
||
<p>The first parameter of a field is the minimum width to pad the output to
|
||
if the output is less than this absolute value of this width,
|
||
it will be padded with leading spaces, or, if the argument is negative,
|
||
with trailing spaces. the default is zero.</p>
|
||
<p>The second parameter of a field is particular to the output field type.
|
||
defaults can be found in the full substitution help below</p>
|
||
<p>special prefixes to numeric arguments</p>
|
||
<ul>
|
||
<li><code>0</code>: (e.g. 010) interpret argument as octal (integer output fields only)</li>
|
||
<li><code>0x</code>: (e.g. 0xABC) interpret argument as hex (numeric output fields only)</li>
|
||
<li><code>\'</code>: (e.g. 'a) interpret argument as a character constant</li>
|
||
</ul>
|
||
<h4 id="how-to-use-substitutions"><a class="header" href="#how-to-use-substitutions">HOW TO USE SUBSTITUTIONS</a></h4>
|
||
<p>Substitutions are used to pass additional argument(s) into the FORMAT string, to be formatted a
|
||
particular way. E.g.</p>
|
||
<pre><code>printf 'the letter %X comes before the letter %X' 10 11
|
||
</code></pre>
|
||
<p>will print</p>
|
||
<pre><code>the letter A comes before the letter B
|
||
</code></pre>
|
||
<p>because the substitution field <code>%X</code> means
|
||
'take an integer argument and write it as a hexadecimal number'</p>
|
||
<p>Passing more arguments than are in the format string will cause the format string to be
|
||
repeated for the remaining substitutions</p>
|
||
<pre><code>printf 'it is %i F in %s \n' 22 Portland 25 Boston 27 New York
|
||
</code></pre>
|
||
<p>will print</p>
|
||
<pre><code>it is 22 F in Portland
|
||
it is 25 F in Boston
|
||
it is 27 F in Boston
|
||
</code></pre>
|
||
<p>If a format string is printed but there are less arguments remaining
|
||
than there are substitution fields, substitution fields without
|
||
an argument will default to empty strings, or for numeric fields
|
||
the value 0</p>
|
||
<h4 id="available-substitutions"><a class="header" href="#available-substitutions">AVAILABLE SUBSTITUTIONS</a></h4>
|
||
<p>This program, like GNU coreutils printf,
|
||
interprets a modified subset of the POSIX C printf spec,
|
||
a quick reference to substitutions is below.</p>
|
||
<h4 id="string-substitutions"><a class="header" href="#string-substitutions">STRING SUBSTITUTIONS</a></h4>
|
||
<p>All string fields have a 'max width' parameter
|
||
<code>%.3s</code> means 'print no more than three characters of the original input'</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>%s</code>: string</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%b</code>: escaped string - the string will be checked for any escaped literals from
|
||
the escaped literal list above, and translate them to literal characters.
|
||
e.g. <code>\\n</code> will be transformed into a newline character.
|
||
One special rule about <code>%b</code> mode is that octal literals are interpreted differently
|
||
In arguments passed by <code>%b</code>, pass octal-interpreted literals must be in the form of <code>\\0NNN</code>
|
||
instead of <code>\\NNN</code>. (Although, for legacy reasons, octal literals in the form of <code>\\NNN</code> will
|
||
still be interpreted and not throw a warning, you will have problems if you use this for a
|
||
literal whose code begins with zero, as it will be viewed as in <code>\\0NNN</code> form.)</p>
|
||
</li>
|
||
</ul>
|
||
<h4 id="char-substitutions"><a class="header" href="#char-substitutions">CHAR SUBSTITUTIONS</a></h4>
|
||
<p>The character field does not have a secondary parameter.</p>
|
||
<ul>
|
||
<li><code>%c</code>: a single character</li>
|
||
</ul>
|
||
<h4 id="integer-substitutions"><a class="header" href="#integer-substitutions">INTEGER SUBSTITUTIONS</a></h4>
|
||
<p>All integer fields have a 'pad with zero' parameter
|
||
<code>%.4i</code> means an integer which if it is less than 4 digits in length,
|
||
is padded with leading zeros until it is 4 digits in length.</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>%d</code> or <code>%i</code>: 64-bit integer</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%u</code>: 64-bit unsigned integer</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%x</code> or <code>%X</code>: 64-bit unsigned integer printed in Hexadecimal (base 16)
|
||
<code>%X</code> instead of <code>%x</code> means to use uppercase letters for 'a' through 'f'</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%o</code>: 64-bit unsigned integer printed in octal (base 8)</p>
|
||
</li>
|
||
</ul>
|
||
<h4 id="floating-point-substitutions"><a class="header" href="#floating-point-substitutions">FLOATING POINT SUBSTITUTIONS</a></h4>
|
||
<p>All floating point fields have a 'max decimal places / max significant digits' parameter
|
||
<code>%.10f</code> means a decimal floating point with 7 decimal places past 0
|
||
<code>%.10e</code> means a scientific notation number with 10 significant digits
|
||
<code>%.10g</code> means the same behavior for decimal and Sci. Note, respectively, and provides the shortest
|
||
of each's output.</p>
|
||
<p>Like with GNU coreutils, the value after the decimal point is these outputs is parsed as a
|
||
double first before being rendered to text. For both implementations do not expect meaningful
|
||
precision past the 18th decimal place. When using a number of decimal places that is 18 or
|
||
higher, you can expect variation in output between GNU coreutils printf and this printf at the
|
||
18th decimal place of +/- 1</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>%f</code>: floating point value presented in decimal, truncated and displayed to 6 decimal places by
|
||
default. There is not past-double behavior parity with Coreutils printf, values are not
|
||
estimated or adjusted beyond input values.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%e</code> or <code>%E</code>: floating point value presented in scientific notation
|
||
7 significant digits by default
|
||
<code>%E</code> means use to use uppercase E for the mantissa.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>%g</code> or <code>%G</code>: floating point value presented in the shortest of decimal and scientific notation
|
||
behaves differently from <code>%f</code> and <code>%E</code>, please see posix printf spec for full details,
|
||
some examples of different behavior:
|
||
Sci Note has 6 significant digits by default
|
||
Trailing zeroes are removed
|
||
Instead of being truncated, digit after last is rounded</p>
|
||
</li>
|
||
</ul>
|
||
<p>Like other behavior in this utility, the design choices of floating point
|
||
behavior in this utility is selected to reproduce in exact
|
||
the behavior of GNU coreutils' printf from an inputs and outputs standpoint.</p>
|
||
<h3 id="using-parameters"><a class="header" href="#using-parameters">USING PARAMETERS</a></h3>
|
||
<p>Most substitution fields can be parameterized using up to 2 numbers that can
|
||
be passed to the field, between the % sign and the field letter.</p>
|
||
<p>The 1st parameter always indicates the minimum width of output, it is useful for creating
|
||
columnar output. Any output that would be less than this minimum width is padded with
|
||
leading spaces
|
||
The 2nd parameter is proceeded by a dot.
|
||
You do not have to use parameters</p>
|
||
<h3 id="special-forms-of-input"><a class="header" href="#special-forms-of-input">SPECIAL FORMS OF INPUT</a></h3>
|
||
<p>For numeric input, the following additional forms of input are accepted besides decimal:</p>
|
||
<p>Octal (only with integer): if the argument begins with a 0 the proceeding characters
|
||
will be interpreted as octal (base 8) for integer fields</p>
|
||
<p>Hexadecimal: if the argument begins with 0x the proceeding characters will be interpreted
|
||
will be interpreted as hex (base 16) for any numeric fields
|
||
for float fields, hexadecimal input results in a precision
|
||
limit (in converting input past the decimal point) of 10^-15</p>
|
||
<p>Character Constant: if the argument begins with a single quote character, the first byte
|
||
of the next character will be interpreted as an 8-bit unsigned integer. If there are
|
||
additional bytes, they will throw an error (unless the environment variable POSIXLY_CORRECT
|
||
is set)</p>
|
||
<h2 id="examples-63"><a class="header" href="#examples-63">Examples</a></h2>
|
||
<p>Print a text message:</p>
|
||
<pre><code class="language-shell">printf "{{%s\n}}" "{{Hello world}}"
|
||
</code></pre>
|
||
<p>Print an integer in bold blue:</p>
|
||
<pre><code class="language-shell">printf "{{\e[1;34m%.3d\e[0m\n}}" {{42}}
|
||
</code></pre>
|
||
<p>Print a float number with the Unicode Euro sign:</p>
|
||
<pre><code class="language-shell">printf "{{\u20AC %.2f\n}}" {{123.4}}
|
||
</code></pre>
|
||
<p>Print a text message composed with environment variables:</p>
|
||
<pre><code class="language-shell">printf "{{var1: %s\tvar2: %s\n}}" "{{$VAR1}}" "{{$VAR2}}"
|
||
</code></pre>
|
||
<p>Store a formatted message in a variable (does not work on zsh):</p>
|
||
<pre><code class="language-shell">printf -v {{myvar}} {{"This is %s = %d\n" "a year" 2016}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="ptx"><a class="header" href="#ptx">ptx</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>ptx [OPTION]... [INPUT]...
|
||
ptx -G [OPTION]... [INPUT [OUTPUT]]
|
||
</code></pre>
|
||
<p>Produce a permuted index of file contents
|
||
Output a permuted index, including context, of the words in the input files.
|
||
Mandatory arguments to long options are mandatory for short options too.
|
||
With no FILE, or when FILE is -, read standard input. Default is '-F /'.</p>
|
||
<h2 id="options-65"><a class="header" href="#options-65">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--auto-reference</code>, <code>-A</code></dt>
|
||
<dd>
|
||
<p>output automatically generated references</p>
|
||
</dd>
|
||
<dt><code>--traditional</code>, <code>-G</code></dt>
|
||
<dd>
|
||
<p>behave more like System V 'ptx'</p>
|
||
</dd>
|
||
<dt><code>--flag-truncation=<STRING></code>, <code>-F <STRING></code></dt>
|
||
<dd>
|
||
<p>use STRING for flagging line truncations</p>
|
||
</dd>
|
||
<dt><code>--macro-name=<STRING></code>, <code>-M <STRING></code></dt>
|
||
<dd>
|
||
<p>macro name to use instead of 'xx'</p>
|
||
</dd>
|
||
<dt><code>--format=roff</code>, <code>-O</code></dt>
|
||
<dd>
|
||
<p>generate output as roff directives</p>
|
||
</dd>
|
||
<dt><code>--right-side-refs</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>put references at right, not counted in -w</p>
|
||
</dd>
|
||
<dt><code>--sentence-regexp=<REGEXP></code>, <code>-S <REGEXP></code></dt>
|
||
<dd>
|
||
<p>for end of lines or end of sentences</p>
|
||
</dd>
|
||
<dt><code>--format=tex</code>, <code>-T</code></dt>
|
||
<dd>
|
||
<p>generate output as TeX directives</p>
|
||
</dd>
|
||
<dt><code>--word-regexp=<REGEXP></code>, <code>-W <REGEXP></code></dt>
|
||
<dd>
|
||
<p>use REGEXP to match each keyword</p>
|
||
</dd>
|
||
<dt><code>--break-file=<FILE></code>, <code>-b <FILE></code></dt>
|
||
<dd>
|
||
<p>word break characters in this FILE</p>
|
||
</dd>
|
||
<dt><code>--ignore-case</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>fold lower case to upper case for sorting</p>
|
||
</dd>
|
||
<dt><code>--gap-size=<NUMBER></code>, <code>-g <NUMBER></code></dt>
|
||
<dd>
|
||
<p>gap size in columns between output fields</p>
|
||
</dd>
|
||
<dt><code>--ignore-file=<FILE></code>, <code>-i <FILE></code></dt>
|
||
<dd>
|
||
<p>read ignore word list from FILE</p>
|
||
</dd>
|
||
<dt><code>--only-file=<FILE></code>, <code>-o <FILE></code></dt>
|
||
<dd>
|
||
<p>read only word list from this FILE</p>
|
||
</dd>
|
||
<dt><code>--references=<FILE></code>, <code>-r <FILE></code></dt>
|
||
<dd>
|
||
<p>first field of each line is a reference</p>
|
||
</dd>
|
||
<dt><code>--width=<NUMBER></code>, <code>-w <NUMBER></code></dt>
|
||
<dd>
|
||
<p>output width in columns, reference excluded</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-64"><a class="header" href="#examples-64">Examples</a></h2>
|
||
<p>Generate a permuted index where the first field of each line is an index reference:</p>
|
||
<pre><code class="language-shell">ptx --references {{path/to/file}}
|
||
</code></pre>
|
||
<p>Generate a permuted index with automatically generated index references:</p>
|
||
<pre><code class="language-shell">ptx --auto-reference {{path/to/file}}
|
||
</code></pre>
|
||
<p>Generate a permuted index with a fixed width:</p>
|
||
<pre><code class="language-shell">ptx --width={{width_in_columns}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Generate a permuted index with a list of filtered words:</p>
|
||
<pre><code class="language-shell">ptx --only-file={{path/to/filter}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Generate a permuted index with SYSV-style behaviors:</p>
|
||
<pre><code class="language-shell">ptx --traditional {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="pwd"><a class="header" href="#pwd">pwd</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>pwd [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Display the full filename of the current working directory.</p>
|
||
<h2 id="options-66"><a class="header" href="#options-66">Options</a></h2>
|
||
<dl><dt><code>--logical</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>use PWD from environment, even if it contains symlinks</p>
|
||
</dd>
|
||
<dt><code>--physical</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>avoid all symlinks</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-65"><a class="header" href="#examples-65">Examples</a></h2>
|
||
<p>Print the current directory:</p>
|
||
<pre><code class="language-shell">pwd
|
||
</code></pre>
|
||
<p>Print the current directory, and resolve all symlinks (i.e. show the "physical" path):</p>
|
||
<pre><code class="language-shell">pwd -P
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="readlink"><a class="header" href="#readlink">readlink</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>readlink [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Print value of a symbolic link or canonical file name.</p>
|
||
<h2 id="options-67"><a class="header" href="#options-67">Options</a></h2>
|
||
<dl><dt><code>--canonicalize</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist</p>
|
||
</dd>
|
||
<dt><code>--canonicalize-existing</code>, <code>-e</code></dt>
|
||
<dd>
|
||
<p>canonicalize by following every symlink in every component of the given name recursively, all components must exist</p>
|
||
</dd>
|
||
<dt><code>--canonicalize-missing</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence</p>
|
||
</dd>
|
||
<dt><code>--no-newline</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>do not output the trailing delimiter</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>suppress most error messages</p>
|
||
</dd>
|
||
<dt><code>--silent</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>suppress most error messages</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>report error message</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>separate output with NUL rather than newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-66"><a class="header" href="#examples-66">Examples</a></h2>
|
||
<p>Get the actual file to which the symlink points:</p>
|
||
<pre><code class="language-shell">readlink {{path/to/file}}
|
||
</code></pre>
|
||
<p>Get the absolute path to a file:</p>
|
||
<pre><code class="language-shell">readlink -f {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="realpath"><a class="header" href="#realpath">realpath</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>realpath [OPTION]... FILE...
|
||
</code></pre>
|
||
<p>Print the resolved path</p>
|
||
<h2 id="options-68"><a class="header" href="#options-68">Options</a></h2>
|
||
<dl><dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Do not print warnings for invalid paths</p>
|
||
</dd>
|
||
<dt><code>--strip</code>, <code>--no-symlinks</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>Only strip '.' and '..' components, but don't resolve symbolic links</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>Separate output filenames with \0 rather than newline</p>
|
||
</dd>
|
||
<dt><code>--logical</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>resolve '..' components before symlinks</p>
|
||
</dd>
|
||
<dt><code>--physical</code>, <code>-P</code></dt>
|
||
<dd>
|
||
<p>resolve symlinks as encountered (default)</p>
|
||
</dd>
|
||
<dt><code>--canonicalize-existing</code>, <code>-e</code></dt>
|
||
<dd>
|
||
<p>canonicalize by following every symlink in every component of the given name recursively, all components must exist</p>
|
||
</dd>
|
||
<dt><code>--canonicalize-missing</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence</p>
|
||
</dd>
|
||
<dt><code>--relative-to=<DIR></code></dt>
|
||
<dd>
|
||
<p>print the resolved path relative to DIR</p>
|
||
</dd>
|
||
<dt><code>--relative-base=<DIR></code></dt>
|
||
<dd>
|
||
<p>print absolute paths unless paths below DIR</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-67"><a class="header" href="#examples-67">Examples</a></h2>
|
||
<p>Display the absolute path for a file or directory:</p>
|
||
<pre><code class="language-shell">realpath {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Require all path components to exist:</p>
|
||
<pre><code class="language-shell">realpath --canonicalize-existing {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Resolve ".." components before symlinks:</p>
|
||
<pre><code class="language-shell">realpath --logical {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Disable symlink expansion:</p>
|
||
<pre><code class="language-shell">realpath --no-symlinks {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<p>Suppress error messages:</p>
|
||
<pre><code class="language-shell">realpath --quiet {{path/to/file_or_directory}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="relpath"><a class="header" href="#relpath">relpath</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>relpath [-d DIR] TO [FROM]
|
||
</code></pre>
|
||
<p>Convert TO destination to the relative path from the FROM dir.
|
||
If FROM path is omitted, current working dir will be used.</p>
|
||
<h2 id="options-69"><a class="header" href="#options-69">Options</a></h2>
|
||
<dl><dt><code>-d</code></dt>
|
||
<dd>
|
||
<p>If any of FROM and TO is not subpath of DIR, output absolute path instead of relative</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="rm"><a class="header" href="#rm">rm</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>rm [OPTION]... FILE...
|
||
</code></pre>
|
||
<p>Remove (unlink) the FILE(s)</p>
|
||
<h2 id="options-70"><a class="header" href="#options-70">Options</a></h2>
|
||
<dl><dt><code>--force</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>ignore nonexistent files and arguments, never prompt</p>
|
||
</dd>
|
||
<dt><code>-i</code></dt>
|
||
<dd>
|
||
<p>prompt before every removal</p>
|
||
</dd>
|
||
<dt><code>-I</code></dt>
|
||
<dd>
|
||
<p>prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving some protection against most mistakes</p>
|
||
</dd>
|
||
<dt><code>--interactive=<WHEN></code></dt>
|
||
<dd>
|
||
<p>prompt according to WHEN: never, once (-I), or always (-i). Without WHEN, prompts always</p>
|
||
</dd>
|
||
<dt><code>--one-file-system</code></dt>
|
||
<dd>
|
||
<p>when removing a hierarchy recursively, skip any directory that is on a file system different from that of the corresponding command line argument (NOT IMPLEMENTED)</p>
|
||
</dd>
|
||
<dt><code>--no-preserve-root</code></dt>
|
||
<dd>
|
||
<p>do not treat '/' specially</p>
|
||
</dd>
|
||
<dt><code>--preserve-root</code></dt>
|
||
<dd>
|
||
<p>do not remove '/' (default)</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-r</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>remove directories and their contents recursively</p>
|
||
</dd>
|
||
<dt><code>--dir</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>remove empty directories</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>explain what is being done</p>
|
||
</dd>
|
||
<dt><code>--presume-input-tty</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>By default, rm does not remove directories. Use the --recursive (-r or -R)
|
||
option to remove each listed directory, too, along with all of its contents</p>
|
||
<p>To remove a file whose name starts with a '-', for example '-foo',
|
||
use one of these commands:
|
||
rm -- -foo</p>
|
||
<p>rm ./-foo</p>
|
||
<p>Note that if you use rm to remove a file, it might be possible to recover
|
||
some of its contents, given sufficient expertise and/or time. For greater
|
||
assurance that the contents are truly unrecoverable, consider using shred.</p>
|
||
<h2 id="examples-68"><a class="header" href="#examples-68">Examples</a></h2>
|
||
<p>Remove specific files:</p>
|
||
<pre><code class="language-shell">rm {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Remove specific files ignoring nonexistent ones:</p>
|
||
<pre><code class="language-shell">rm -f {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Remove specific files [i]nteractively prompting before each removal:</p>
|
||
<pre><code class="language-shell">rm -i {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Remove specific files printing info about each removal:</p>
|
||
<pre><code class="language-shell">rm -v {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Remove specific files and directories [r]ecursively:</p>
|
||
<pre><code class="language-shell">rm -r {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="rmdir"><a class="header" href="#rmdir">rmdir</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>rmdir [OPTION]... DIRECTORY...
|
||
</code></pre>
|
||
<p>Remove the DIRECTORY(ies), if they are empty.</p>
|
||
<h2 id="options-71"><a class="header" href="#options-71">Options</a></h2>
|
||
<dl><dt><code>--ignore-fail-on-non-empty</code></dt>
|
||
<dd>
|
||
<p>ignore each failure that is solely because a directory is non-empty</p>
|
||
</dd>
|
||
<dt><code>--parents</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>remove DIRECTORY and its ancestors; e.g.,<br /> 'rmdir -p a/b/c' is similar to rmdir a/b/c a/b a</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>output a diagnostic for every directory processed</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-69"><a class="header" href="#examples-69">Examples</a></h2>
|
||
<p>Remove specific directories:</p>
|
||
<pre><code class="language-shell">rmdir {{path/to/directory1 path/to/directory2 ...}}
|
||
</code></pre>
|
||
<p>Remove specific nested directories recursively:</p>
|
||
<pre><code class="language-shell">rmdir -p {{path/to/directory1 path/to/directory2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="runcon"><a class="header" href="#runcon">runcon</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>runcon [CONTEXT COMMAND [ARG...]]
|
||
runcon [-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [ARG...]";
|
||
</code></pre>
|
||
<p>Run command with specified security context under SELinux enabled systems.</p>
|
||
<h2 id="options-72"><a class="header" href="#options-72">Options</a></h2>
|
||
<dl><dt><code>--compute</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>Compute process transition context before modifying.</p>
|
||
</dd>
|
||
<dt><code>--user=<USER></code>, <code>-u <USER></code></dt>
|
||
<dd>
|
||
<p>Set user USER in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--role=<ROLE></code>, <code>-r <ROLE></code></dt>
|
||
<dd>
|
||
<p>Set role ROLE in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--type=<TYPE></code>, <code>-t <TYPE></code></dt>
|
||
<dd>
|
||
<p>Set type TYPE in the target security context.</p>
|
||
</dd>
|
||
<dt><code>--range=<RANGE></code>, <code>-l <RANGE></code></dt>
|
||
<dd>
|
||
<p>Set range RANGE in the target security context.</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Run COMMAND with completely-specified CONTEXT, or with current or transitioned security context modified by one or more of LEVEL, ROLE, TYPE, and USER.</p>
|
||
<p>If none of --compute, --type, --user, --role or --range is specified, then the first argument is used as the complete context.</p>
|
||
<p>Note that only carefully-chosen contexts are likely to successfully run.</p>
|
||
<p>With neither CONTEXT nor COMMAND are specified, then this prints the current security context.</p>
|
||
<h2 id="examples-70"><a class="header" href="#examples-70">Examples</a></h2>
|
||
<p>Determine the current domain:</p>
|
||
<pre><code class="language-shell">runcon
|
||
</code></pre>
|
||
<p>Specify the domain to run a command in:</p>
|
||
<pre><code class="language-shell">runcon -t {{domain}}_t {{command}}
|
||
</code></pre>
|
||
<p>Specify the context role to run a command with:</p>
|
||
<pre><code class="language-shell">runcon -r {{role}}_r {{command}}
|
||
</code></pre>
|
||
<p>Specify the full context to run a command with:</p>
|
||
<pre><code class="language-shell">runcon {{user}}_u:{{role}}_r:{{domain}}_t {{command}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="seq"><a class="header" href="#seq">seq</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>seq [OPTION]... LAST
|
||
seq [OPTION]... FIRST LAST
|
||
seq [OPTION]... FIRST INCREMENT LAST";
|
||
</code></pre>
|
||
<h2 id="options-73"><a class="header" href="#options-73">Options</a></h2>
|
||
<dl><dt><code>--separator</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>Separator character (defaults to \n)</p>
|
||
</dd>
|
||
<dt><code>--terminator</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>Terminator character (defaults to \n)</p>
|
||
</dd>
|
||
<dt><code>--widths</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>Equalize widths of all numbers by padding with zeros</p>
|
||
</dd>
|
||
<dt><code>--format</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>use printf style floating-point FORMAT</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-71"><a class="header" href="#examples-71">Examples</a></h2>
|
||
<p>Sequence from 1 to 10:</p>
|
||
<pre><code class="language-shell">seq 10
|
||
</code></pre>
|
||
<p>Every 3rd number from 5 to 20:</p>
|
||
<pre><code class="language-shell">seq 5 3 20
|
||
</code></pre>
|
||
<p>Separate the output with a space instead of a newline:</p>
|
||
<pre><code class="language-shell">seq -s " " 5 3 20
|
||
</code></pre>
|
||
<p>Format output width to a minimum of 4 digits padding with zeros as necessary:</p>
|
||
<pre><code class="language-shell">seq -f "%04g" 5 3 20
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha1sum"><a class="header" href="#sha1sum">sha1sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-74"><a class="header" href="#options-74">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-72"><a class="header" href="#examples-72">Examples</a></h2>
|
||
<p>Calculate the SHA1 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">sha1sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of SHA1 checksums to a file:</p>
|
||
<pre><code class="language-shell">sha1sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha1}}
|
||
</code></pre>
|
||
<p>Calculate a SHA1 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | sha1sum
|
||
</code></pre>
|
||
<p>Read a file of SHA1 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">sha1sum --check {{path/to/file.sha1}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">sha1sum --check --quiet {{path/to/file.sha1}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">sha1sum --ignore-missing --check --quiet {{path/to/file.sha1}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha224sum"><a class="header" href="#sha224sum">sha224sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-75"><a class="header" href="#options-75">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-73"><a class="header" href="#examples-73">Examples</a></h2>
|
||
<p>Calculate the SHA224 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">sha224sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of SHA224 checksums to a file:</p>
|
||
<pre><code class="language-shell">sha224sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha224}}
|
||
</code></pre>
|
||
<p>Calculate a SHA224 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | sha224sum
|
||
</code></pre>
|
||
<p>Read a file of SHA224 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">sha224sum --check {{path/to/file.sha224}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">sha224sum --check --quiet {{path/to/file.sha224}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">sha224sum --ignore-missing --check --quiet {{path/to/file.sha224}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha256sum"><a class="header" href="#sha256sum">sha256sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-76"><a class="header" href="#options-76">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-74"><a class="header" href="#examples-74">Examples</a></h2>
|
||
<p>Calculate the SHA256 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">sha256sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of SHA256 checksums to a file:</p>
|
||
<pre><code class="language-shell">sha256sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha256}}
|
||
</code></pre>
|
||
<p>Calculate a SHA256 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | sha256sum
|
||
</code></pre>
|
||
<p>Read a file of SHA256 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">sha256sum --check {{path/to/file.sha256}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">sha256sum --check --quiet {{path/to/file.sha256}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">sha256sum --ignore-missing --check --quiet {{path/to/file.sha256}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha3-224sum"><a class="header" href="#sha3-224sum">sha3-224sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-77"><a class="header" href="#options-77">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha3-256sum"><a class="header" href="#sha3-256sum">sha3-256sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-78"><a class="header" href="#options-78">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha3-384sum"><a class="header" href="#sha3-384sum">sha3-384sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-79"><a class="header" href="#options-79">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha3-512sum"><a class="header" href="#sha3-512sum">sha3-512sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-80"><a class="header" href="#options-80">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha384sum"><a class="header" href="#sha384sum">sha384sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-81"><a class="header" href="#options-81">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-75"><a class="header" href="#examples-75">Examples</a></h2>
|
||
<p>Calculate the SHA384 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">sha384sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of SHA384 checksums to a file:</p>
|
||
<pre><code class="language-shell">sha384sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha384}}
|
||
</code></pre>
|
||
<p>Calculate a SHA384 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | sha384sum
|
||
</code></pre>
|
||
<p>Read a file of SHA384 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">sha384sum --check {{path/to/file.sha384}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">sha384sum --check --quiet {{path/to/file.sha384}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">sha384sum --ignore-missing --check --quiet {{path/to/file.sha384}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha3sum"><a class="header" href="#sha3sum">sha3sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-82"><a class="header" href="#options-82">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--bits=<BITS></code></dt>
|
||
<dd>
|
||
<p>set the size of the output (only for SHAKE)</p>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sha512sum"><a class="header" href="#sha512sum">sha512sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-83"><a class="header" href="#options-83">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-76"><a class="header" href="#examples-76">Examples</a></h2>
|
||
<p>Calculate the SHA512 checksum for one or more files:</p>
|
||
<pre><code class="language-shell">sha512sum {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Calculate and save the list of SHA512 checksums to a file:</p>
|
||
<pre><code class="language-shell">sha512sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha512}}
|
||
</code></pre>
|
||
<p>Calculate a SHA512 checksum from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{command}} | sha512sum
|
||
</code></pre>
|
||
<p>Read a file of SHA512 sums and filenames and verify all files have matching checksums:</p>
|
||
<pre><code class="language-shell">sha512sum --check {{path/to/file.sha512}}
|
||
</code></pre>
|
||
<p>Only show a message for missing files or when verification fails:</p>
|
||
<pre><code class="language-shell">sha512sum --check --quiet {{path/to/file.sha512}}
|
||
</code></pre>
|
||
<p>Only show a message when verification fails, ignoring missing files:</p>
|
||
<pre><code class="language-shell">sha512sum --ignore-missing --check --quiet {{path/to/file.sha512}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="shake128sum"><a class="header" href="#shake128sum">shake128sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-84"><a class="header" href="#options-84">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--bits=<BITS></code></dt>
|
||
<dd>
|
||
<p>set the size of the output (only for SHAKE)</p>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="shake256sum"><a class="header" href="#shake256sum">shake256sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-85"><a class="header" href="#options-85">Options</a></h2>
|
||
<dl><dt><code>--binary</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>read in binary mode</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>read hashsums from the FILEs and check them</p>
|
||
</dd>
|
||
<dt><code>--tag</code></dt>
|
||
<dd>
|
||
<p>create a BSD-style checksum</p>
|
||
</dd>
|
||
<dt><code>--text</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>read in text mode (default)</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>don't print OK for each successfully verified file</p>
|
||
</dd>
|
||
<dt><code>--status</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>don't output anything, status code shows success</p>
|
||
</dd>
|
||
<dt><code>--strict</code></dt>
|
||
<dd>
|
||
<p>exit non-zero for improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--warn</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>warn about improperly formatted checksum lines</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end each output line with NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--bits=<BITS></code></dt>
|
||
<dd>
|
||
<p>set the size of the output (only for SHAKE)</p>
|
||
</dd>
|
||
</dl>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="shred"><a class="header" href="#shred">shred</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>shred [OPTION]... FILE...
|
||
</code></pre>
|
||
<p>Overwrite the specified FILE(s) repeatedly, in order to make it harder for even
|
||
very expensive hardware probing to recover the data.</p>
|
||
<h2 id="options-86"><a class="header" href="#options-86">Options</a></h2>
|
||
<dl><dt><code>--force</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>change permissions to allow writing if necessary</p>
|
||
</dd>
|
||
<dt><code>--iterations=<NUMBER></code>, <code>-n <NUMBER></code></dt>
|
||
<dd>
|
||
<p>overwrite N times instead of the default (3)</p>
|
||
</dd>
|
||
<dt><code>--size=<N></code>, <code>-s <N></code></dt>
|
||
<dd>
|
||
<p>shred this many bytes (suffixes like K, M, G accepted)</p>
|
||
</dd>
|
||
<dt><code>--remove</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>truncate and remove file after overwriting; See below</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>show progress</p>
|
||
</dd>
|
||
<dt><code>--exact</code>, <code>-x</code></dt>
|
||
<dd>
|
||
<p>do not round file sizes up to the next full block;<br />this is the default for non-regular files</p>
|
||
</dd>
|
||
<dt><code>--zero</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>add a final overwrite with zeros to hide shredding</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Delete <code>FILE(s)</code> if <code>--remove</code> (<code>-u</code>) is specified. The default is not to remove
|
||
the files because it is common to operate on device files like <code>/dev/hda</code>, and
|
||
those files usually should not be removed.</p>
|
||
<p>CAUTION: Note that shred relies on a very important assumption: that the file
|
||
system overwrites data in place. This is the traditional way to do things, but
|
||
many modern file system designs do not satisfy this assumption. The following
|
||
are examples of file systems on which shred is not effective, or is not
|
||
guaranteed to be effective in all file system modes:</p>
|
||
<ul>
|
||
<li>
|
||
<p>log-structured or journal file systems, such as those supplied with
|
||
AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)</p>
|
||
</li>
|
||
<li>
|
||
<p>file systems that write redundant data and carry on even if some writes
|
||
fail, such as RAID-based file systems</p>
|
||
</li>
|
||
<li>
|
||
<p>file systems that make snapshots, such as Network Appliance's NFS server</p>
|
||
</li>
|
||
<li>
|
||
<p>file systems that cache in temporary locations, such as NFS
|
||
version 3 clients</p>
|
||
</li>
|
||
<li>
|
||
<p>compressed file systems</p>
|
||
</li>
|
||
</ul>
|
||
<p>In the case of ext3 file systems, the above disclaimer applies (and shred is
|
||
thus of limited effectiveness) only in <code>data=journal</code> mode, which journals file
|
||
data in addition to just metadata. In both the <code>data=ordered</code> (default) and
|
||
<code>data=writeback</code> modes, shred works as usual. Ext3 journal modes can be changed
|
||
by adding the <code>data=something</code> option to the mount options for a particular
|
||
file system in the <code>/etc/fstab</code> file, as documented in the mount man page (<code>man mount</code>).</p>
|
||
<p>In addition, file system backups and remote mirrors may contain copies of
|
||
the file that cannot be removed, and that will allow a shredded file to be
|
||
recovered later.</p>
|
||
<h2 id="examples-77"><a class="header" href="#examples-77">Examples</a></h2>
|
||
<p>Overwrite a file:</p>
|
||
<pre><code class="language-shell">shred {{path/to/file}}
|
||
</code></pre>
|
||
<p>Overwrite a file, leaving zeroes instead of random data:</p>
|
||
<pre><code class="language-shell">shred --zero {{path/to/file}}
|
||
</code></pre>
|
||
<p>Overwrite a file 25 times:</p>
|
||
<pre><code class="language-shell">shred -n25 {{path/to/file}}
|
||
</code></pre>
|
||
<p>Overwrite a file and remove it:</p>
|
||
<pre><code class="language-shell">shred --remove {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="shuf"><a class="header" href="#shuf">shuf</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>shuf [OPTION]... [FILE]
|
||
shuf -e [OPTION]... [ARG]...
|
||
shuf -i LO-HI [OPTION]...;
|
||
</code></pre>
|
||
<p>Shuffle the input by outputting a random permutation of input lines.
|
||
Each output permutation is equally likely.
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<h2 id="options-87"><a class="header" href="#options-87">Options</a></h2>
|
||
<dl><dt><code>--echo=<ARG></code>, <code>-e <ARG></code></dt>
|
||
<dd>
|
||
<p>treat each ARG as an input line</p>
|
||
</dd>
|
||
<dt><code>--input-range=<LO-HI></code>, <code>-i <LO-HI></code></dt>
|
||
<dd>
|
||
<p>treat each number LO through HI as an input line</p>
|
||
</dd>
|
||
<dt><code>--head-count=<COUNT></code>, <code>-n <COUNT></code></dt>
|
||
<dd>
|
||
<p>output at most COUNT lines</p>
|
||
</dd>
|
||
<dt><code>--output=<FILE></code>, <code>-o <FILE></code></dt>
|
||
<dd>
|
||
<p>write result to FILE instead of standard output</p>
|
||
</dd>
|
||
<dt><code>--random-source=<FILE></code></dt>
|
||
<dd>
|
||
<p>get random bytes from FILE</p>
|
||
</dd>
|
||
<dt><code>--repeat</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>output lines can be repeated</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-78"><a class="header" href="#examples-78">Examples</a></h2>
|
||
<p>Randomize the order of lines in a file and output the result:</p>
|
||
<pre><code class="language-shell">shuf {{path/to/file}}
|
||
</code></pre>
|
||
<p>Only output the first 5 entries of the result:</p>
|
||
<pre><code class="language-shell">shuf --head-count={{5}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Write the output to another file:</p>
|
||
<pre><code class="language-shell">shuf {{path/to/input}} --output={{path/to/output}}
|
||
</code></pre>
|
||
<p>Generate 3 random numbers in the range 1-10 (inclusive):</p>
|
||
<pre><code class="language-shell">shuf --head-count={{3}} --input-range={{1-10}} --repeat
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sleep"><a class="header" href="#sleep">sleep</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>sleep NUMBER[SUFFIX]...
|
||
sleep OPTION
|
||
</code></pre>
|
||
<p>Pause for NUMBER seconds.</p>
|
||
<h2 id="options-88"><a class="header" href="#options-88">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
<p>pause for NUMBER seconds</p>
|
||
</dd>
|
||
</dl>
|
||
<p>Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default),
|
||
'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations
|
||
that require NUMBER be an integer, here NUMBER may be an arbitrary floating
|
||
point number. Given two or more arguments, pause for the amount of time
|
||
specified by the sum of their values.</p>
|
||
<h2 id="examples-79"><a class="header" href="#examples-79">Examples</a></h2>
|
||
<p>Delay in seconds:</p>
|
||
<pre><code class="language-shell">sleep {{seconds}}
|
||
</code></pre>
|
||
<p>Execute a specific command after 20 seconds delay:</p>
|
||
<pre><code class="language-shell">sleep 20 && {{command}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sort"><a class="header" href="#sort">sort</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>sort [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Display sorted concatenation of all FILE(s). With no FILE, or when FILE is -, read standard input.</p>
|
||
<h2 id="options-89"><a class="header" href="#options-89">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--version</code></dt>
|
||
<dd>
|
||
<p>Print version information.</p>
|
||
</dd>
|
||
<dt><code>--sort</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--human-numeric-sort</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>compare according to human readable sizes, eg 1M > 100k</p>
|
||
</dd>
|
||
<dt><code>--month-sort</code>, <code>-M</code></dt>
|
||
<dd>
|
||
<p>compare according to month name abbreviation</p>
|
||
</dd>
|
||
<dt><code>--numeric-sort</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>compare according to string numerical value</p>
|
||
</dd>
|
||
<dt><code>--general-numeric-sort</code>, <code>-g</code></dt>
|
||
<dd>
|
||
<p>compare according to string general numerical value</p>
|
||
</dd>
|
||
<dt><code>--version-sort</code>, <code>-V</code></dt>
|
||
<dd>
|
||
<p>Sort by SemVer version number, eg 1.12.2 > 1.1.2</p>
|
||
</dd>
|
||
<dt><code>--random-sort</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>shuffle in random order</p>
|
||
</dd>
|
||
<dt><code>--dictionary-order</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>consider only blanks and alphanumeric characters</p>
|
||
</dd>
|
||
<dt><code>--merge</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>merge already sorted files; do not sort</p>
|
||
</dd>
|
||
<dt><code>--check</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>check for sorted input; do not sort</p>
|
||
</dd>
|
||
<dt><code>--check-silent</code>, <code>-C</code></dt>
|
||
<dd>
|
||
<p>exit successfully if the given file is already sorted, and exit with status 1 otherwise.</p>
|
||
</dd>
|
||
<dt><code>--ignore-case</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>fold lower case to upper case characters</p>
|
||
</dd>
|
||
<dt><code>--ignore-nonprinting</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>ignore nonprinting characters</p>
|
||
</dd>
|
||
<dt><code>--ignore-leading-blanks</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>ignore leading blanks when finding sort keys in each line</p>
|
||
</dd>
|
||
<dt><code>--output=<FILENAME></code>, <code>-o <FILENAME></code></dt>
|
||
<dd>
|
||
<p>write output to FILENAME instead of stdout</p>
|
||
</dd>
|
||
<dt><code>--reverse</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>reverse the output</p>
|
||
</dd>
|
||
<dt><code>--stable</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>stabilize sort by disabling last-resort comparison</p>
|
||
</dd>
|
||
<dt><code>--unique</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>output only the first of an equal run</p>
|
||
</dd>
|
||
<dt><code>--key</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>sort by a key</p>
|
||
</dd>
|
||
<dt><code>--field-separator</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>custom separator for -k</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt><code>--parallel=<NUM_THREADS></code></dt>
|
||
<dd>
|
||
<p>change the number of threads running concurrently to NUM_THREADS</p>
|
||
</dd>
|
||
<dt><code>--buffer-size=<SIZE></code>, <code>-S <SIZE></code></dt>
|
||
<dd>
|
||
<p>sets the maximum SIZE of each segment in number of sorted items</p>
|
||
</dd>
|
||
<dt><code>--temporary-directory=<DIR></code>, <code>-T <DIR></code></dt>
|
||
<dd>
|
||
<p>use DIR for temporaries, not $TMPDIR or /tmp</p>
|
||
</dd>
|
||
<dt><code>--compress-program=<PROG></code></dt>
|
||
<dd>
|
||
<p>compress temporary files with PROG, decompress with PROG -d; PROG has to take input from stdin and output to stdout</p>
|
||
</dd>
|
||
<dt><code>--batch-size=<N_MERGE></code></dt>
|
||
<dd>
|
||
<p>Merge at most N_MERGE inputs at once.</p>
|
||
</dd>
|
||
<dt><code>--files0-from=<NUL_FILES></code></dt>
|
||
<dd>
|
||
<p>read input from the files specified by NUL-terminated NUL_FILES</p>
|
||
</dd>
|
||
<dt><code>--debug</code></dt>
|
||
<dd>
|
||
<p>underline the parts of the line that are actually used for sorting</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>The key format is <code>FIELD[.CHAR][OPTIONS][,FIELD[.CHAR]][OPTIONS]</code>.</p>
|
||
<p>Fields by default are separated by the first whitespace after a non-whitespace character. Use <code>-t</code> to specify a custom separator.
|
||
In the default case, whitespace is appended at the beginning of each field. Custom separators however are not included in fields.</p>
|
||
<p><code>FIELD</code> and <code>CHAR</code> both start at 1 (i.e. they are 1-indexed). If there is no end specified after a comma, the end will be the end of the line.
|
||
If <code>CHAR</code> is set 0, it means the end of the field. <code>CHAR</code> defaults to 1 for the start position and to 0 for the end position.</p>
|
||
<p>Valid options are: <code>MbdfhnRrV</code>. They override the global options for this key.</p>
|
||
<h2 id="examples-80"><a class="header" href="#examples-80">Examples</a></h2>
|
||
<p>Sort a file in ascending order:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort a file in descending order:</p>
|
||
<pre><code class="language-shell">sort --reverse {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort a file in case-insensitive way:</p>
|
||
<pre><code class="language-shell">sort --ignore-case {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort a file using numeric rather than alphabetic order:</p>
|
||
<pre><code class="language-shell">sort --numeric-sort {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort <code>/etc/passwd</code> by the 3rd field of each line numerically, using ":" as a field separator:</p>
|
||
<pre><code class="language-shell">sort --field-separator={{:}} --key={{3n}} {{/etc/passwd}}
|
||
</code></pre>
|
||
<p>Sort a file preserving only unique lines:</p>
|
||
<pre><code class="language-shell">sort --unique {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort a file, printing the output to the specified output file (can be used to sort a file in-place):</p>
|
||
<pre><code class="language-shell">sort --output={{path/to/file}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Sort numbers with exponents:</p>
|
||
<pre><code class="language-shell">sort --general-numeric-sort {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="split"><a class="header" href="#split">split</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>split [OPTION]... [INPUT [PREFIX]]
|
||
</code></pre>
|
||
<p>Create output files containing consecutive or interleaved sections of input</p>
|
||
<h2 id="options-90"><a class="header" href="#options-90">Options</a></h2>
|
||
<dl><dt><code>--bytes=<SIZE></code>, <code>-b <SIZE></code></dt>
|
||
<dd>
|
||
<p>put SIZE bytes per output file</p>
|
||
</dd>
|
||
<dt><code>--line-bytes=<SIZE></code>, <code>-C <SIZE></code></dt>
|
||
<dd>
|
||
<p>put at most SIZE bytes of lines per output file</p>
|
||
</dd>
|
||
<dt><code>--lines=<NUMBER></code>, <code>-l <NUMBER></code></dt>
|
||
<dd>
|
||
<p>put NUMBER lines/records per output file</p>
|
||
</dd>
|
||
<dt><code>--number=<CHUNKS></code>, <code>-n <CHUNKS></code></dt>
|
||
<dd>
|
||
<p>generate CHUNKS output files; see explanation below</p>
|
||
</dd>
|
||
<dt><code>--additional-suffix=<SUFFIX></code></dt>
|
||
<dd>
|
||
<p>additional SUFFIX to append to output file names</p>
|
||
</dd>
|
||
<dt><code>--filter=<COMMAND></code></dt>
|
||
<dd>
|
||
<p>write to shell COMMAND; file name is $FILE (Currently not implemented for Windows)</p>
|
||
</dd>
|
||
<dt><code>--elide-empty-files</code>, <code>-e</code></dt>
|
||
<dd>
|
||
<p>do not generate empty output files with '-n'</p>
|
||
</dd>
|
||
<dt><code>--numeric-suffixes</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>use numeric suffixes instead of alphabetic</p>
|
||
</dd>
|
||
<dt><code>--suffix-length=<N></code>, <code>-a <N></code></dt>
|
||
<dd>
|
||
<p>use suffixes of fixed length N. 0 implies dynamic length.</p>
|
||
</dd>
|
||
<dt><code>--hex-suffixes</code>, <code>-x</code></dt>
|
||
<dd>
|
||
<p>use hex suffixes instead of alphabetic</p>
|
||
</dd>
|
||
<dt><code>--verbose</code></dt>
|
||
<dd>
|
||
<p>print a diagnostic just before each output file is opened</p>
|
||
</dd>
|
||
<dt><code>--io</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--io-blksize</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000, and default PREFIX is 'x'. With no INPUT, or when INPUT is -, read standard input.</p>
|
||
<h2 id="examples-81"><a class="header" href="#examples-81">Examples</a></h2>
|
||
<p>Split a file, each split having 10 lines (except the last split):</p>
|
||
<pre><code class="language-shell">split -l {{10}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Split a file into 5 files. File is split such that each split has same size (except the last split):</p>
|
||
<pre><code class="language-shell">split -n {{5}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes):</p>
|
||
<pre><code class="language-shell">split -b {{512}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Split a file with at most 512 bytes in each split without breaking lines:</p>
|
||
<pre><code class="language-shell">split -C {{512}} {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="stat"><a class="header" href="#stat">stat</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>stat [OPTION]... FILE...
|
||
</code></pre>
|
||
<p>Display file or file system status.</p>
|
||
<h2 id="options-91"><a class="header" href="#options-91">Options</a></h2>
|
||
<dl><dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>follow links</p>
|
||
</dd>
|
||
<dt><code>--file-system</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>display file system status instead of file status</p>
|
||
</dd>
|
||
<dt><code>--terse</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>print the information in terse form</p>
|
||
</dd>
|
||
<dt><code>--format=<FORMAT></code>, <code>-c <FORMAT></code></dt>
|
||
<dd>
|
||
<p>use the specified FORMAT instead of the default;<br /> output a newline after each use of FORMAT</p>
|
||
</dd>
|
||
<dt><code>--printf=<FORMAT></code></dt>
|
||
<dd>
|
||
<p>like --format, but interpret backslash escapes,<br /> and do not output a mandatory trailing newline;<br /> if you want a newline, include <br /> in FORMAT</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-82"><a class="header" href="#examples-82">Examples</a></h2>
|
||
<p>Display properties about a specific file such as size, permissions, creation and access dates among others:</p>
|
||
<pre><code class="language-shell">stat {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display properties about a specific file such as size, permissions, creation and access dates among others without labels:</p>
|
||
<pre><code class="language-shell">stat --terse {{path/to/file}}
|
||
</code></pre>
|
||
<p>Display information about the filesystem where a specific file is located:</p>
|
||
<pre><code class="language-shell">stat --file-system {{path/to/file}}
|
||
</code></pre>
|
||
<p>Show only octal file permissions:</p>
|
||
<pre><code class="language-shell">stat --format="%a %n" {{path/to/file}}
|
||
</code></pre>
|
||
<p>Show the owner and group of a specific file:</p>
|
||
<pre><code class="language-shell">stat --format="%U %G" {{path/to/file}}
|
||
</code></pre>
|
||
<p>Show the size of a specific file in bytes:</p>
|
||
<pre><code class="language-shell">stat --format="%s %n" {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="stdbuf"><a class="header" href="#stdbuf">stdbuf</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>stdbuf [OPTION]... COMMAND
|
||
</code></pre>
|
||
<p>Run <code>COMMAND</code>, with modified buffering operations for its standard streams.</p>
|
||
<p>Mandatory arguments to long options are mandatory for short options too.</p>
|
||
<h2 id="options-92"><a class="header" href="#options-92">Options</a></h2>
|
||
<dl><dt><code>--input=<MODE></code>, <code>-i <MODE></code></dt>
|
||
<dd>
|
||
<p>adjust standard input stream buffering</p>
|
||
</dd>
|
||
<dt><code>--output=<MODE></code>, <code>-o <MODE></code></dt>
|
||
<dd>
|
||
<p>adjust standard output stream buffering</p>
|
||
</dd>
|
||
<dt><code>--error=<MODE></code>, <code>-e <MODE></code></dt>
|
||
<dd>
|
||
<p>adjust standard error stream buffering</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>If <code>MODE</code> is 'L' the corresponding stream will be line buffered.
|
||
This option is invalid with standard input.</p>
|
||
<p>If <code>MODE</code> is '0' the corresponding stream will be unbuffered.</p>
|
||
<p>Otherwise, <code>MODE</code> is a number which may be followed by one of the following:</p>
|
||
<p>KB 1000, K 1024, MB 1000<em>1000, M 1024</em>1024, and so on for G, T, P, E, Z, Y.
|
||
In this case the corresponding stream will be fully buffered with the buffer size set to <code>MODE</code> bytes.</p>
|
||
<p>NOTE: If <code>COMMAND</code> adjusts the buffering of its standard streams (<code>tee</code> does for e.g.) then that will override corresponding settings changed by <code>stdbuf</code>.
|
||
Also some filters (like <code>dd</code> and <code>cat</code> etc.) don't use streams for I/O, and are thus unaffected by <code>stdbuf</code> settings.</p>
|
||
<h2 id="examples-83"><a class="header" href="#examples-83">Examples</a></h2>
|
||
<p>Change the standard input buffer size to 512 KiB:</p>
|
||
<pre><code class="language-shell">stdbuf --input={{512K}} {{command}}
|
||
</code></pre>
|
||
<p>Change the standard output buffer to line-buffered:</p>
|
||
<pre><code class="language-shell">stdbuf --output={{L}} {{command}}
|
||
</code></pre>
|
||
<p>Change the standard error buffer to unbuffered:</p>
|
||
<pre><code class="language-shell">stdbuf --error={{0}} {{command}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="stty"><a class="header" href="#stty">stty</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>stty [-F DEVICE | --file=DEVICE] [SETTING]...
|
||
stty [-F DEVICE | --file=DEVICE] [-a|--all]
|
||
stty [-F DEVICE | --file=DEVICE] [-g|--save]
|
||
</code></pre>
|
||
<p>Print or change terminal characteristics.</p>
|
||
<h2 id="options-93"><a class="header" href="#options-93">Options</a></h2>
|
||
<dl><dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>print all current settings in human-readable form</p>
|
||
</dd>
|
||
<dt><code>--save</code>, <code>-g</code></dt>
|
||
<dd>
|
||
<p>print all current settings in a stty-readable form</p>
|
||
</dd>
|
||
<dt><code>--file=<DEVICE></code>, <code>-F <DEVICE></code></dt>
|
||
<dd>
|
||
<p>open and use the specified DEVICE instead of stdin</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
<p>settings to change</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-84"><a class="header" href="#examples-84">Examples</a></h2>
|
||
<p>Display all settings for the current terminal:</p>
|
||
<pre><code class="language-shell">stty --all
|
||
</code></pre>
|
||
<p>Set the number of rows or columns:</p>
|
||
<pre><code class="language-shell">stty {{rows|cols}} {{count}}
|
||
</code></pre>
|
||
<p>Get the actual transfer speed of a device:</p>
|
||
<pre><code class="language-shell">stty --file {{path/to/device_file}} speed
|
||
</code></pre>
|
||
<p>Reset all modes to reasonable values for the current terminal:</p>
|
||
<pre><code class="language-shell">stty sane
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sum"><a class="header" href="#sum">sum</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>sum [OPTION]... [FILE]..."
|
||
</code></pre>
|
||
<p>Checksum and count the blocks in a file.</p>
|
||
<p>With no FILE, or when FILE is -, read standard input.</p>
|
||
<h2 id="options-94"><a class="header" href="#options-94">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-r</code></dt>
|
||
<dd>
|
||
<p>use the BSD sum algorithm, use 1K blocks (default)</p>
|
||
</dd>
|
||
<dt><code>--sysv</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>use System V sum algorithm, use 512 bytes blocks</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-85"><a class="header" href="#examples-85">Examples</a></h2>
|
||
<p>Compute a checksum with BSD-compatible algorithm and 1024-byte blocks:</p>
|
||
<pre><code class="language-shell">sum {{path/to/file}}
|
||
</code></pre>
|
||
<p>Compute a checksum with System V-compatible algorithm and 512-byte blocks:</p>
|
||
<pre><code class="language-shell">sum --sysv {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="sync"><a class="header" href="#sync">sync</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>sync [OPTION]... FILE...
|
||
</code></pre>
|
||
<p>Synchronize cached writes to persistent storage</p>
|
||
<h2 id="options-95"><a class="header" href="#options-95">Options</a></h2>
|
||
<dl><dt><code>--file-system</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>sync the file systems that contain the files (Linux and Windows only)</p>
|
||
</dd>
|
||
<dt><code>--data</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>sync only file data, no unneeded metadata (Linux only)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-86"><a class="header" href="#examples-86">Examples</a></h2>
|
||
<p>Flush all pending write operations on all disks:</p>
|
||
<pre><code class="language-shell">sync
|
||
</code></pre>
|
||
<p>Flush all pending write operations on a single file to disk:</p>
|
||
<pre><code class="language-shell">sync {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tac"><a class="header" href="#tac">tac</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tac [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Write each file to standard output, last line first.</p>
|
||
<h2 id="options-96"><a class="header" href="#options-96">Options</a></h2>
|
||
<dl><dt><code>--before</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>attach the separator before instead of after</p>
|
||
</dd>
|
||
<dt><code>--regex</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>interpret the sequence as a regular expression</p>
|
||
</dd>
|
||
<dt><code>--separator=<STRING></code>, <code>-s <STRING></code></dt>
|
||
<dd>
|
||
<p>use STRING as the separator instead of newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-87"><a class="header" href="#examples-87">Examples</a></h2>
|
||
<p>Concatenate specific files in reversed order:</p>
|
||
<pre><code class="language-shell">tac {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Display <code>stdin</code> in reversed order:</p>
|
||
<pre><code class="language-shell">{{cat path/to/file}} | tac
|
||
</code></pre>
|
||
<p>Use a specific [s]eparator:</p>
|
||
<pre><code class="language-shell">tac -s {{separator}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Use a specific [r]egex as a [s]eparator:</p>
|
||
<pre><code class="language-shell">tac -r -s {{separator}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Use a separator [b]efore each file:</p>
|
||
<pre><code class="language-shell">tac -b {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tail"><a class="header" href="#tail">tail</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tail [FLAG]... [FILE]...
|
||
</code></pre>
|
||
<p>Print the last 10 lines of each FILE to standard output.
|
||
With more than one FILE, precede each with a header giving the file name.
|
||
With no FILE, or when FILE is -, read standard input.</p>
|
||
<p>Mandatory arguments to long flags are mandatory for short flags too.</p>
|
||
<h2 id="options-97"><a class="header" href="#options-97">Options</a></h2>
|
||
<dl><dt><code>--bytes</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>Number of bytes to print</p>
|
||
</dd>
|
||
<dt><code>--follow</code>, <code>-f</code></dt>
|
||
<dd>
|
||
<p>Print the file as it grows</p>
|
||
</dd>
|
||
<dt><code>--lines</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>Number of lines to print</p>
|
||
</dd>
|
||
<dt><code>--pid=<PID></code></dt>
|
||
<dd>
|
||
<p>With -f, terminate after process ID, PID dies</p>
|
||
</dd>
|
||
<dt><code>--quiet</code>, <code>--silent</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Never output headers giving file names</p>
|
||
</dd>
|
||
<dt><code>--sleep-interval=<N></code>, <code>-s <N></code></dt>
|
||
<dd>
|
||
<p>Number of seconds to sleep between polling the file when running with -f</p>
|
||
</dd>
|
||
<dt><code>--max-unchanged-stats=<N></code></dt>
|
||
<dd>
|
||
<p>Reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files); This option is meaningful only when polling (i.e., with --use-polling) and when --follow=name</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>Always output headers giving file names</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>Line delimiter is NUL, not newline</p>
|
||
</dd>
|
||
<dt><code>--use-polling</code></dt>
|
||
<dd>
|
||
<p>Disable 'inotify' support and use polling instead</p>
|
||
</dd>
|
||
<dt><code>--retry</code></dt>
|
||
<dd>
|
||
<p>Keep trying to open a file if it is inaccessible</p>
|
||
</dd>
|
||
<dt><code>-F</code></dt>
|
||
<dd>
|
||
<p>Same as --follow=name --retry</p>
|
||
</dd>
|
||
<dt><code>--presume-input-pipe</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-88"><a class="header" href="#examples-88">Examples</a></h2>
|
||
<p>Show last 'count' lines in file:</p>
|
||
<pre><code class="language-shell">tail --lines {{count}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Print a file from a specific line number:</p>
|
||
<pre><code class="language-shell">tail --lines +{{count}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Print a specific count of bytes from the end of a given file:</p>
|
||
<pre><code class="language-shell">tail --bytes {{count}} {{path/to/file}}
|
||
</code></pre>
|
||
<p>Print the last lines of a given file and keep reading file until <code>Ctrl + C</code>:</p>
|
||
<pre><code class="language-shell">tail --follow {{path/to/file}}
|
||
</code></pre>
|
||
<p>Keep reading file until <code>Ctrl + C</code>, even if the file is inaccessible:</p>
|
||
<pre><code class="language-shell">tail --retry --follow {{path/to/file}}
|
||
</code></pre>
|
||
<p>Show last 'num' lines in 'file' and refresh every 'n' seconds:</p>
|
||
<pre><code class="language-shell">tail --lines {{count}} --sleep-interval {{seconds}} --follow {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tee"><a class="header" href="#tee">tee</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tee [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Copy standard input to each FILE, and also to standard output.</p>
|
||
<h2 id="options-98"><a class="header" href="#options-98">Options</a></h2>
|
||
<dl><dt><code>--append</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>append to the given FILEs, do not overwrite</p>
|
||
</dd>
|
||
<dt><code>--ignore-interrupts</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>ignore interrupt signals (ignored on non-Unix platforms)</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>set write error behavior (ignored on non-Unix platforms)</p>
|
||
</dd>
|
||
<dt><code>--output-error</code></dt>
|
||
<dd>
|
||
<p>set write error behavior</p>
|
||
</dd>
|
||
</dl>
|
||
<p>If a FILE is -, it refers to a file named - .</p>
|
||
<h2 id="examples-89"><a class="header" href="#examples-89">Examples</a></h2>
|
||
<p>Copy standard input to each file, and also to standard output:</p>
|
||
<pre><code class="language-shell">echo "example" | tee {{path/to/file}}
|
||
</code></pre>
|
||
<p>Append to the given files, do not overwrite:</p>
|
||
<pre><code class="language-shell">echo "example" | tee -a {{path/to/file}}
|
||
</code></pre>
|
||
<p>Print standard input to the terminal, and also pipe it into another program for further processing:</p>
|
||
<pre><code class="language-shell">echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}
|
||
</code></pre>
|
||
<p>Create a directory called "example", count the number of characters in "example" and write "example" to the terminal:</p>
|
||
<pre><code class="language-shell">echo "example" | tee >(xargs mkdir) >(wc -c)
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="test"><a class="header" href="#test">test</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>test EXPRESSION
|
||
test
|
||
test EXPRESSION ]
|
||
test ]
|
||
test OPTION
|
||
</code></pre>
|
||
<p>Check file types and compare values.</p>
|
||
<h2 id="options-99"><a class="header" href="#options-99">Options</a></h2>
|
||
<dl></dl>
|
||
<p>Exit with the status determined by <code>EXPRESSION</code>.</p>
|
||
<p>An omitted <code>EXPRESSION</code> defaults to false.
|
||
Otherwise, <code>EXPRESSION</code> is true or false and sets exit status. </p>
|
||
<p>It is one of:</p>
|
||
<ul>
|
||
<li>( EXPRESSION ) <code>EXPRESSION</code> is true</li>
|
||
<li>! EXPRESSION <code>EXPRESSION</code> is false</li>
|
||
<li>EXPRESSION1 -a EXPRESSION2 both <code>EXPRESSION1</code> and <code>EXPRESSION2</code> are true</li>
|
||
<li>EXPRESSION1 -o EXPRESSION2 either <code>EXPRESSION1</code> or <code>EXPRESSION2</code> is true</li>
|
||
</ul>
|
||
<p>String operations:</p>
|
||
<ul>
|
||
<li>-n STRING the length of <code>STRING</code> is nonzero</li>
|
||
<li>STRING equivalent to -n <code>STRING</code></li>
|
||
<li>-z STRING the length of <code>STRING</code> is zero</li>
|
||
<li>STRING1 = STRING2 the strings are equal</li>
|
||
<li>STRING1 != STRING2 the strings are not equal</li>
|
||
</ul>
|
||
<p>Integer comparisons:</p>
|
||
<ul>
|
||
<li>INTEGER1 -eq INTEGER2 <code>INTEGER1</code> is equal to <code>INTEGER2</code></li>
|
||
<li>INTEGER1 -ge INTEGER2 <code>INTEGER1</code> is greater than or equal to <code>INTEGER2</code></li>
|
||
<li>INTEGER1 -gt INTEGER2 <code>INTEGER1</code> is greater than <code>INTEGER2</code></li>
|
||
<li>INTEGER1 -le INTEGER2 <code>INTEGER1</code> is less than or equal to <code>INTEGER2</code></li>
|
||
<li>INTEGER1 -lt INTEGER2 <code>INTEGER1</code> is less than <code>INTEGER2</code></li>
|
||
<li>INTEGER1 -ne INTEGER2 <code>INTEGER1</code> is not equal to <code>INTEGER2</code></li>
|
||
</ul>
|
||
<p>File operations:</p>
|
||
<ul>
|
||
<li>
|
||
<p>FILE1 -ef FILE2 <code>FILE1</code> and <code>FILE2</code> have the same device and inode numbers</p>
|
||
</li>
|
||
<li>
|
||
<p>FILE1 -nt FILE2 <code>FILE1</code> is newer (modification date) than <code>FILE2</code></p>
|
||
</li>
|
||
<li>
|
||
<p>FILE1 -ot FILE2 <code>FILE1</code> is older than <code>FILE2</code></p>
|
||
</li>
|
||
<li>
|
||
<p>-b FILE <code>FILE</code> exists and is block special</p>
|
||
</li>
|
||
<li>
|
||
<p>-c FILE <code>FILE</code> exists and is character special</p>
|
||
</li>
|
||
<li>
|
||
<p>-d FILE <code>FILE</code> exists and is a directory</p>
|
||
</li>
|
||
<li>
|
||
<p>-e FILE <code>FILE</code> exists</p>
|
||
</li>
|
||
<li>
|
||
<p>-f FILE <code>FILE</code> exists and is a regular file</p>
|
||
</li>
|
||
<li>
|
||
<p>-g FILE <code>FILE</code> exists and is set-group-ID</p>
|
||
</li>
|
||
<li>
|
||
<p>-G FILE <code>FILE</code> exists and is owned by the effective group ID</p>
|
||
</li>
|
||
<li>
|
||
<p>-h FILE <code>FILE</code> exists and is a symbolic link (same as -L)</p>
|
||
</li>
|
||
<li>
|
||
<p>-k FILE <code>FILE</code> exists and has its sticky bit set</p>
|
||
</li>
|
||
<li>
|
||
<p>-L FILE <code>FILE</code> exists and is a symbolic link (same as -h)</p>
|
||
</li>
|
||
<li>
|
||
<p>-N FILE <code>FILE</code> exists and has been modified since it was last read</p>
|
||
</li>
|
||
<li>
|
||
<p>-O FILE <code>FILE</code> exists and is owned by the effective user ID</p>
|
||
</li>
|
||
<li>
|
||
<p>-p FILE <code>FILE</code> exists and is a named pipe</p>
|
||
</li>
|
||
<li>
|
||
<p>-r FILE <code>FILE</code> exists and read permission is granted</p>
|
||
</li>
|
||
<li>
|
||
<p>-s FILE <code>FILE</code> exists and has a size greater than zero</p>
|
||
</li>
|
||
<li>
|
||
<p>-S FILE <code>FILE</code> exists and is a socket</p>
|
||
</li>
|
||
<li>
|
||
<p>-t FD <code>file</code> descriptor <code>FD</code> is opened on a terminal</p>
|
||
</li>
|
||
<li>
|
||
<p>-u FILE <code>FILE</code> exists and its set-user-ID bit is set</p>
|
||
</li>
|
||
<li>
|
||
<p>-w FILE <code>FILE</code> exists and write permission is granted</p>
|
||
</li>
|
||
<li>
|
||
<p>-x FILE <code>FILE</code> exists and execute (or search) permission is granted</p>
|
||
</li>
|
||
</ul>
|
||
<p>Except for <code>-h</code> and <code>-L</code>, all FILE-related tests dereference (follow) symbolic links.
|
||
Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
|
||
<code>INTEGER</code> may also be -l <code>STRING</code>, which evaluates to the length of <code>STRING</code>.</p>
|
||
<p>NOTE: Binary <code>-a</code> and <code>-o</code> are inherently ambiguous.
|
||
Use <code>test EXPR1 && test EXPR2</code> or <code>test EXPR1 || test EXPR2</code> instead.</p>
|
||
<p>NOTE: <code>[</code> honors the <code>--help</code> and <code>--version</code> options, but test does not.
|
||
test treats each of those as it treats any other nonempty <code>STRING</code>.</p>
|
||
<p>NOTE: your shell may have its own version of <code>test</code> and/or <code>[</code>, which usually supersedes the version described here.
|
||
Please refer to your shell's documentation for details about the options it supports.</p>
|
||
<h2 id="examples-90"><a class="header" href="#examples-90">Examples</a></h2>
|
||
<p>Test if a given variable is equal to a given string:</p>
|
||
<pre><code class="language-shell">test "{{$MY_VAR}}" == "{{/bin/zsh}}"
|
||
</code></pre>
|
||
<p>Test if a given variable is empty:</p>
|
||
<pre><code class="language-shell">test -z "{{$GIT_BRANCH}}"
|
||
</code></pre>
|
||
<p>Test if a file exists:</p>
|
||
<pre><code class="language-shell">test -f "{{path/to/file_or_directory}}"
|
||
</code></pre>
|
||
<p>Test if a directory does not exist:</p>
|
||
<pre><code class="language-shell">test ! -d "{{path/to/directory}}"
|
||
</code></pre>
|
||
<p>If A is true, then do B, or C in the case of an error (notice that C may run even if A fails):</p>
|
||
<pre><code class="language-shell">test {{condition}} && {{echo "true"}} || {{echo "false"}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="timeout"><a class="header" href="#timeout">timeout</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>timeout [OPTION] DURATION COMMAND...
|
||
</code></pre>
|
||
<p>Start <code>COMMAND</code>, and kill it if still running after <code>DURATION</code>.</p>
|
||
<h2 id="options-100"><a class="header" href="#options-100">Options</a></h2>
|
||
<dl><dt><code>--foreground</code></dt>
|
||
<dd>
|
||
<p>when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out</p>
|
||
</dd>
|
||
<dt><code>--kill-after</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>also send a KILL signal if COMMAND is still running this long after the initial signal was sent</p>
|
||
</dd>
|
||
<dt><code>--preserve-status</code></dt>
|
||
<dd>
|
||
<p>exit with the same status as COMMAND, even when the command times out</p>
|
||
</dd>
|
||
<dt><code>--signal=<SIGNAL></code>, <code>-s <SIGNAL></code></dt>
|
||
<dd>
|
||
<p>specify the signal to be sent on timeout; SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signals</p>
|
||
</dd>
|
||
<dt><code>--verbose</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>diagnose to stderr any signal sent upon timeout</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-91"><a class="header" href="#examples-91">Examples</a></h2>
|
||
<p>Run <code>sleep 10</code> and terminate it, if it runs for more than 3 seconds:</p>
|
||
<pre><code class="language-shell">timeout {{3s}} {{sleep 10}}
|
||
</code></pre>
|
||
<p>Specify the signal to be sent to the command after the time limit expires. (By default, TERM is sent):</p>
|
||
<pre><code class="language-shell">timeout --signal {{INT}} {{5s}} {{sleep 10}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="touch"><a class="header" href="#touch">touch</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>touch [OPTION]... [USER]
|
||
</code></pre>
|
||
<p>Update the access and modification times of each <code>FILE</code> to the current time.</p>
|
||
<h2 id="options-101"><a class="header" href="#options-101">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>-a</code></dt>
|
||
<dd>
|
||
<p>change only the access time</p>
|
||
</dd>
|
||
<dt><code>-t <STAMP></code></dt>
|
||
<dd>
|
||
<p>use [[CC]YY]MMDDhhmm[.ss] instead of the current time</p>
|
||
</dd>
|
||
<dt><code>--date=<STRING></code>, <code>-d <STRING></code></dt>
|
||
<dd>
|
||
<p>parse argument and use it instead of current time</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>change only the modification time</p>
|
||
</dd>
|
||
<dt><code>--no-create</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>do not create any files</p>
|
||
</dd>
|
||
<dt><code>--no-dereference</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>affect each symbolic link instead of any referenced file (only for systems that can change the timestamps of a symlink)</p>
|
||
</dd>
|
||
<dt><code>--reference=<FILE></code>, <code>-r <FILE></code></dt>
|
||
<dd>
|
||
<p>use this file's times instead of the current time</p>
|
||
</dd>
|
||
<dt><code>--time=<WORD></code></dt>
|
||
<dd>
|
||
<p>change only the specified time: "access", "atime", or "use" are equivalent to -a; "modify" or "mtime" are equivalent to -m</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-92"><a class="header" href="#examples-92">Examples</a></h2>
|
||
<p>Create specific files:</p>
|
||
<pre><code class="language-shell">touch {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Set the file [a]ccess or [m]odification times to the current one and don't [c]reate file if it doesn't exist:</p>
|
||
<pre><code class="language-shell">touch -c -{{a|m}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Set the file [t]ime to a specific value and don't [c]reate file if it doesn't exist:</p>
|
||
<pre><code class="language-shell">touch -c -t {{YYYYMMDDHHMM.SS}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<p>Set the file time of a specific file to the time of anothe[r] file and don't [c]reate file if it doesn't exist:</p>
|
||
<pre><code class="language-shell">touch -c -r {{~/.emacs}} {{path/to/file1 path/to/file2 ...}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tr"><a class="header" href="#tr">tr</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tr [OPTION]... SET1 [SET2]
|
||
</code></pre>
|
||
<p>Translate or delete characters</p>
|
||
<h2 id="options-102"><a class="header" href="#options-102">Options</a></h2>
|
||
<dl><dt><code>--complement</code>, <code>-c</code>, <code>-C</code></dt>
|
||
<dd>
|
||
<p>use the complement of SET1</p>
|
||
</dd>
|
||
<dt><code>--delete</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>delete characters in SET1, do not translate</p>
|
||
</dd>
|
||
<dt><code>--squeeze-repeats</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>replace each sequence of a repeated character that is listed in the last specified SET, with a single occurrence of that character</p>
|
||
</dd>
|
||
<dt><code>--truncate-set1</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>first truncate SET1 to length of SET2</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Translate, squeeze, and/or delete characters from standard input, writing to standard output.</p>
|
||
<h2 id="examples-93"><a class="header" href="#examples-93">Examples</a></h2>
|
||
<p>Replace all occurrences of a character in a file, and print the result:</p>
|
||
<pre><code class="language-shell">tr {{find_character}} {{replace_character}} < {{path/to/file}}
|
||
</code></pre>
|
||
<p>Replace all occurrences of a character from another command's output:</p>
|
||
<pre><code class="language-shell">echo {{text}} | tr {{find_character}} {{replace_character}}
|
||
</code></pre>
|
||
<p>Map each character of the first set to the corresponding character of the second set:</p>
|
||
<pre><code class="language-shell">tr '{{abcd}}' '{{jkmn}}' < {{path/to/file}}
|
||
</code></pre>
|
||
<p>Delete all occurrences of the specified set of characters from the input:</p>
|
||
<pre><code class="language-shell">tr -d '{{input_characters}}' < {{path/to/file}}
|
||
</code></pre>
|
||
<p>Compress a series of identical characters to a single character:</p>
|
||
<pre><code class="language-shell">tr -s '{{input_characters}}' < {{path/to/file}}
|
||
</code></pre>
|
||
<p>Translate the contents of a file to upper-case:</p>
|
||
<pre><code class="language-shell">tr "[:lower:]" "[:upper:]" < {{path/to/file}}
|
||
</code></pre>
|
||
<p>Strip out non-printable characters from a file:</p>
|
||
<pre><code class="language-shell">tr -cd "[:print:]" < {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="true"><a class="header" href="#true">true</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>true
|
||
</code></pre>
|
||
<p>Returns true, a successful exit status.</p>
|
||
<p>Immediately returns with the exit status <code>0</code>, except when invoked with one of the recognized
|
||
options. In those cases it will try to write the help or version text. Any IO error during this
|
||
operation causes the program to return <code>1</code> instead.</p>
|
||
<h2 id="options-103"><a class="header" href="#options-103">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information</p>
|
||
</dd>
|
||
<dt><code>--version</code></dt>
|
||
<dd>
|
||
<p>Print version information</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-94"><a class="header" href="#examples-94">Examples</a></h2>
|
||
<p>Return a successful exit code:</p>
|
||
<pre><code class="language-shell">true
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="truncate"><a class="header" href="#truncate">truncate</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>truncate [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Shrink or extend the size of each file to the specified size.</p>
|
||
<h2 id="options-104"><a class="header" href="#options-104">Options</a></h2>
|
||
<dl><dt><code>--io-blocks</code>, <code>-o</code></dt>
|
||
<dd>
|
||
<p>treat SIZE as the number of I/O blocks of the file rather than bytes (NOT IMPLEMENTED)</p>
|
||
</dd>
|
||
<dt><code>--no-create</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>do not create files that do not exist</p>
|
||
</dd>
|
||
<dt><code>--reference=<RFILE></code>, <code>-r <RFILE></code></dt>
|
||
<dd>
|
||
<p>base the size of each file on the size of RFILE</p>
|
||
</dd>
|
||
<dt><code>--size=<SIZE></code>, <code>-s <SIZE></code></dt>
|
||
<dd>
|
||
<p>set or adjust the size of each file according to SIZE, which is in bytes unless --io-blocks is specified</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>SIZE is an integer with an optional prefix and optional unit.
|
||
The available units (K, M, G, T, P, E, Z, and Y) use the following format:
|
||
'KB' => 1000 (kilobytes)
|
||
'K' => 1024 (kibibytes)
|
||
'MB' => 1000<em>1000 (megabytes)
|
||
'M' => 1024</em>1024 (mebibytes)
|
||
'GB' => 1000<em>1000</em>1000 (gigabytes)
|
||
'G' => 1024<em>1024</em>1024 (gibibytes)
|
||
SIZE may also be prefixed by one of the following to adjust the size of each
|
||
file based on its current size:
|
||
'+' => extend by
|
||
'-' => reduce by
|
||
'<' => at most
|
||
'>' => at least
|
||
'/' => round down to multiple of
|
||
'%' => round up to multiple of</p>
|
||
<h2 id="examples-95"><a class="header" href="#examples-95">Examples</a></h2>
|
||
<p>Set a size of 10 GB to an existing file, or create a new file with the specified size:</p>
|
||
<pre><code class="language-shell">truncate --size {{10G}} {{filename}}
|
||
</code></pre>
|
||
<p>Extend the file size by 50 MiB, fill with holes (which reads as zero bytes):</p>
|
||
<pre><code class="language-shell">truncate --size +{{50M}} {{filename}}
|
||
</code></pre>
|
||
<p>Shrink the file by 2 GiB, by removing data from the end of file:</p>
|
||
<pre><code class="language-shell">truncate --size -{{2G}} {{filename}}
|
||
</code></pre>
|
||
<p>Empty the file's content:</p>
|
||
<pre><code class="language-shell">truncate --size 0 {{filename}}
|
||
</code></pre>
|
||
<p>Empty the file's content, but do not create the file if it does not exist:</p>
|
||
<pre><code class="language-shell">truncate --no-create --size 0 {{filename}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tsort"><a class="header" href="#tsort">tsort</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tsort [OPTIONS] FILE
|
||
</code></pre>
|
||
<p>Topological sort the strings in FILE.
|
||
Strings are defined as any sequence of tokens separated by whitespace (tab, space, or newline), ordering them based on dependencies in a directed acyclic graph (DAG).
|
||
Useful for scheduling and determining execution order.
|
||
If FILE is not passed in, stdin is used instead.</p>
|
||
<h2 id="options-105"><a class="header" href="#options-105">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-96"><a class="header" href="#examples-96">Examples</a></h2>
|
||
<p>Perform a topological sort consistent with a partial sort per line of input separated by blanks:</p>
|
||
<pre><code class="language-shell">tsort {{path/to/file}}
|
||
</code></pre>
|
||
<p>Perform a topological sort consistent on strings:</p>
|
||
<pre><code class="language-shell">echo -e "{{UI Backend\nBackend Database\nDocs UI}}" | tsort
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="tty"><a class="header" href="#tty">tty</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>tty [OPTION]...
|
||
</code></pre>
|
||
<p>Print the file name of the terminal connected to standard input.</p>
|
||
<h2 id="options-106"><a class="header" href="#options-106">Options</a></h2>
|
||
<dl><dt><code>--silent</code>, <code>--quiet</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print nothing, only return an exit status</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-97"><a class="header" href="#examples-97">Examples</a></h2>
|
||
<p>Print the file name of this terminal:</p>
|
||
<pre><code class="language-shell">tty
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="uname"><a class="header" href="#uname">uname</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>uname [OPTION]...
|
||
</code></pre>
|
||
<p>Print certain system information.
|
||
With no OPTION, same as -s.</p>
|
||
<h2 id="options-107"><a class="header" href="#options-107">Options</a></h2>
|
||
<dl><dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Behave as though all of the options -mnrsvo were specified.</p>
|
||
</dd>
|
||
<dt><code>--kernel-name</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print the kernel name.</p>
|
||
</dd>
|
||
<dt><code>--nodename</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>print the nodename (the nodename may be a name that the system is known by to a communications network).</p>
|
||
</dd>
|
||
<dt><code>--kernel-release</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>print the operating system release.</p>
|
||
</dd>
|
||
<dt><code>--kernel-version</code>, <code>-v</code></dt>
|
||
<dd>
|
||
<p>print the operating system version.</p>
|
||
</dd>
|
||
<dt><code>--machine</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>print the machine hardware name.</p>
|
||
</dd>
|
||
<dt><code>--operating-system</code>, <code>-o</code></dt>
|
||
<dd>
|
||
<p>print the operating system name.</p>
|
||
</dd>
|
||
<dt><code>--processor</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>print the processor type (non-portable)</p>
|
||
</dd>
|
||
<dt><code>--hardware-platform</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>print the hardware platform (non-portable)</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-98"><a class="header" href="#examples-98">Examples</a></h2>
|
||
<p>Print kernel name:</p>
|
||
<pre><code class="language-shell">uname
|
||
</code></pre>
|
||
<p>Print system architecture and processor information:</p>
|
||
<pre><code class="language-shell">uname --machine --processor
|
||
</code></pre>
|
||
<p>Print kernel name, kernel release and kernel version:</p>
|
||
<pre><code class="language-shell">uname --kernel-name --kernel-release --kernel-version
|
||
</code></pre>
|
||
<p>Print system hostname:</p>
|
||
<pre><code class="language-shell">uname --nodename
|
||
</code></pre>
|
||
<p>Print all available system information:</p>
|
||
<pre><code class="language-shell">uname --all
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="unexpand"><a class="header" href="#unexpand">unexpand</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>unexpand [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Convert blanks in each <code>FILE</code> to tabs, writing to standard output.
|
||
With no <code>FILE</code>, or when <code>FILE</code> is <code>-</code>, read standard input.</p>
|
||
<h2 id="options-108"><a class="header" href="#options-108">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>convert all blanks, instead of just initial blanks</p>
|
||
</dd>
|
||
<dt><code>--first-only</code></dt>
|
||
<dd>
|
||
<p>convert only leading sequences of blanks (overrides -a)</p>
|
||
</dd>
|
||
<dt><code>--tabs=<N, LIST></code>, <code>-t <N, LIST></code></dt>
|
||
<dd>
|
||
<p>use comma separated LIST of tab positions or have tabs N characters apart instead of 8 (enables -a)</p>
|
||
</dd>
|
||
<dt><code>--no-utf8</code>, <code>-U</code></dt>
|
||
<dd>
|
||
<p>interpret input file as 8-bit ASCII rather than UTF-8</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-99"><a class="header" href="#examples-99">Examples</a></h2>
|
||
<p>Convert blanks in each file to tabs, writing to standard output:</p>
|
||
<pre><code class="language-shell">unexpand {{path/to/file}}
|
||
</code></pre>
|
||
<p>Convert blanks to tabs, reading from standard output:</p>
|
||
<pre><code class="language-shell">unexpand
|
||
</code></pre>
|
||
<p>Convert all blanks, instead of just initial blanks:</p>
|
||
<pre><code class="language-shell">unexpand -a {{path/to/file}}
|
||
</code></pre>
|
||
<p>Convert only leading sequences of blanks (overrides -a):</p>
|
||
<pre><code class="language-shell">unexpand --first-only {{path/to/file}}
|
||
</code></pre>
|
||
<p>Have tabs a certain number of characters apart, not 8 (enables -a):</p>
|
||
<pre><code class="language-shell">unexpand -t {{number}} {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="uniq"><a class="header" href="#uniq">uniq</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>uniq [OPTION]... [INPUT [OUTPUT]]...
|
||
</code></pre>
|
||
<p>Report or omit repeated lines.</p>
|
||
<h2 id="options-109"><a class="header" href="#options-109">Options</a></h2>
|
||
<dl><dt><code>--all-repeated=<delimit-method></code>, <code>-D <delimit-method></code></dt>
|
||
<dd>
|
||
<p>print all duplicate lines. Delimiting is done with blank lines. [default: none]</p>
|
||
</dd>
|
||
<dt><code>--group=<group-method></code></dt>
|
||
<dd>
|
||
<p>show all items, separating groups with an empty line. [default: separate]</p>
|
||
</dd>
|
||
<dt><code>--check-chars=<N></code>, <code>-w <N></code></dt>
|
||
<dd>
|
||
<p>compare no more than N characters in lines</p>
|
||
</dd>
|
||
<dt><code>--count</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>prefix lines by the number of occurrences</p>
|
||
</dd>
|
||
<dt><code>--ignore-case</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>ignore differences in case when comparing</p>
|
||
</dd>
|
||
<dt><code>--repeated</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>only print duplicate lines</p>
|
||
</dd>
|
||
<dt><code>--skip-chars=<N></code>, <code>-s <N></code></dt>
|
||
<dd>
|
||
<p>avoid comparing the first N characters</p>
|
||
</dd>
|
||
<dt><code>--skip-fields=<N></code>, <code>-f <N></code></dt>
|
||
<dd>
|
||
<p>avoid comparing the first N fields</p>
|
||
</dd>
|
||
<dt><code>--unique</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>only print unique lines</p>
|
||
</dd>
|
||
<dt><code>--zero-terminated</code>, <code>-z</code></dt>
|
||
<dd>
|
||
<p>end lines with 0 byte, not newline</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<p>Filter adjacent matching lines from <code>INPUT</code> (or standard input),
|
||
writing to <code>OUTPUT</code> (or standard output).</p>
|
||
<p>Note: <code>uniq</code> does not detect repeated lines unless they are adjacent.
|
||
You may want to sort the input first, or use <code>sort -u</code> without <code>uniq</code>.</p>
|
||
<h2 id="examples-100"><a class="header" href="#examples-100">Examples</a></h2>
|
||
<p>Display each line once:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}} | uniq
|
||
</code></pre>
|
||
<p>Display only unique lines:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}} | uniq -u
|
||
</code></pre>
|
||
<p>Display only duplicate lines:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}} | uniq -d
|
||
</code></pre>
|
||
<p>Display number of occurrences of each line along with that line:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}} | uniq -c
|
||
</code></pre>
|
||
<p>Display number of occurrences of each line, sorted by the most frequent:</p>
|
||
<pre><code class="language-shell">sort {{path/to/file}} | uniq -c | sort -nr
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="unlink"><a class="header" href="#unlink">unlink</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>unlink [FILE]
|
||
</code></pre>
|
||
<p>Unlink the file at <code>FILE</code>.</p>
|
||
<h2 id="options-110"><a class="header" href="#options-110">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-101"><a class="header" href="#examples-101">Examples</a></h2>
|
||
<p>Remove the specified file if it is the last link:</p>
|
||
<pre><code class="language-shell">unlink {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="uptime"><a class="header" href="#uptime">uptime</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>uptime [OPTION]...
|
||
</code></pre>
|
||
<p>Display the current time, the length of time the system has been up,
|
||
the number of users on the system, and the average number of jobs
|
||
in the run queue over the last 1, 5 and 15 minutes.</p>
|
||
<h2 id="options-111"><a class="header" href="#options-111">Options</a></h2>
|
||
<dl><dt><code>--since</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>system up since</p>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-102"><a class="header" href="#examples-102">Examples</a></h2>
|
||
<p>Print current time, uptime, number of logged-in users and other information:</p>
|
||
<pre><code class="language-shell">uptime
|
||
</code></pre>
|
||
<p>Show only the amount of time the system has been booted for:</p>
|
||
<pre><code class="language-shell">uptime --pretty
|
||
</code></pre>
|
||
<p>Print the date and time the system booted up at:</p>
|
||
<pre><code class="language-shell">uptime --since
|
||
</code></pre>
|
||
<p>Show version information:</p>
|
||
<pre><code class="language-shell">uptime --version
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="users"><a class="header" href="#users">users</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>users [FILE]
|
||
</code></pre>
|
||
<p>Print the user names of users currently logged in to the current host.</p>
|
||
<h2 id="options-112"><a class="header" href="#options-112">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-103"><a class="header" href="#examples-103">Examples</a></h2>
|
||
<p>Print logged in usernames:</p>
|
||
<pre><code class="language-shell">users
|
||
</code></pre>
|
||
<p>Print logged in usernames according to a given file:</p>
|
||
<pre><code class="language-shell">users {{/var/log/wmtp}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="vdir"><a class="header" href="#vdir">vdir</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<h2 id="options-113"><a class="header" href="#options-113">Options</a></h2>
|
||
<dl><dt><code>--help</code></dt>
|
||
<dd>
|
||
<p>Print help information.</p>
|
||
</dd>
|
||
<dt><code>--format</code></dt>
|
||
<dd>
|
||
<p>Set the display format.</p>
|
||
</dd>
|
||
<dt><code>-C</code></dt>
|
||
<dd>
|
||
<p>Display the files in columns.</p>
|
||
</dd>
|
||
<dt><code>--long</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>Display detailed information.</p>
|
||
</dd>
|
||
<dt><code>-x</code></dt>
|
||
<dd>
|
||
<p>List entries in rows instead of in columns.</p>
|
||
</dd>
|
||
<dt><code>--tabsize=<COLS></code>, <code>-T <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume tab stops at each COLS instead of 8 (unimplemented)</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>List entries separated by commas.</p>
|
||
</dd>
|
||
<dt><code>--zero</code></dt>
|
||
<dd>
|
||
<p>List entries separated by ASCII NUL characters.</p>
|
||
</dd>
|
||
<dt><code>--dired</code>, <code>-D</code></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><code>-1</code></dt>
|
||
<dd>
|
||
<p>List one file per line.</p>
|
||
</dd>
|
||
<dt><code>-o</code></dt>
|
||
<dd>
|
||
<p>Long format without group information. Identical to --format=long with --no-group.</p>
|
||
</dd>
|
||
<dt><code>-g</code></dt>
|
||
<dd>
|
||
<p>Long format without owner information.</p>
|
||
</dd>
|
||
<dt><code>--numeric-uid-gid</code>, <code>-n</code></dt>
|
||
<dd>
|
||
<p>-l with numeric UIDs and GIDs.</p>
|
||
</dd>
|
||
<dt><code>--quoting-style</code></dt>
|
||
<dd>
|
||
<p>Set quoting style.</p>
|
||
</dd>
|
||
<dt><code>--literal</code>, <code>-N</code></dt>
|
||
<dd>
|
||
<p>Use literal quoting style. Equivalent to <code>--quoting-style=literal</code></p>
|
||
</dd>
|
||
<dt><code>--escape</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>Use escape quoting style. Equivalent to <code>--quoting-style=escape</code></p>
|
||
</dd>
|
||
<dt><code>--quote-name</code>, <code>-Q</code></dt>
|
||
<dd>
|
||
<p>Use C quoting style. Equivalent to <code>--quoting-style=c</code></p>
|
||
</dd>
|
||
<dt><code>--hide-control-chars</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>Replace control characters with '?' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--show-control-chars</code></dt>
|
||
<dd>
|
||
<p>Show control characters 'as is' if they are not escaped.</p>
|
||
</dd>
|
||
<dt><code>--time=<field></code></dt>
|
||
<dd>
|
||
<p>Show time in <field>:<br /> access time (-u): atime, access, use;<br /> change time (-t): ctime, status.<br /> birth time: birth, creation;</p>
|
||
</dd>
|
||
<dt><code>-c</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status change time (the 'ctime' in the inode) instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the status change time.</p>
|
||
</dd>
|
||
<dt><code>-u</code></dt>
|
||
<dd>
|
||
<p>If the long listing format (e.g., -l, -o) is being used, print the status access time instead of the modification time. When explicitly sorting by time (--sort=time or -t) or when not using a long listing format, sort according to the access time.</p>
|
||
</dd>
|
||
<dt><code>--hide=<PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN (overridden by -a or -A)</p>
|
||
</dd>
|
||
<dt><code>--ignore=<PATTERN></code>, <code>-I <PATTERN></code></dt>
|
||
<dd>
|
||
<p>do not list implied entries matching shell PATTERN</p>
|
||
</dd>
|
||
<dt><code>--ignore-backups</code>, <code>-B</code></dt>
|
||
<dd>
|
||
<p>Ignore entries which end with ~.</p>
|
||
</dd>
|
||
<dt><code>--sort=<field></code></dt>
|
||
<dd>
|
||
<p>Sort by <field>: name, none (-U), time (-t), size (-S), extension (-X) or width</p>
|
||
</dd>
|
||
<dt><code>-S</code></dt>
|
||
<dd>
|
||
<p>Sort by file size, largest first.</p>
|
||
</dd>
|
||
<dt><code>-t</code></dt>
|
||
<dd>
|
||
<p>Sort by modification time (the 'mtime' in the inode), newest first.</p>
|
||
</dd>
|
||
<dt><code>-v</code></dt>
|
||
<dd>
|
||
<p>Natural sort of (version) numbers in the filenames.</p>
|
||
</dd>
|
||
<dt><code>-X</code></dt>
|
||
<dd>
|
||
<p>Sort alphabetically by entry extension.</p>
|
||
</dd>
|
||
<dt><code>-U</code></dt>
|
||
<dd>
|
||
<p>Do not sort; list the files in whatever order they are stored in the directory. This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster.</p>
|
||
</dd>
|
||
<dt><code>--dereference</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>When showing file information for a symbolic link, show information for the file the link references rather than the link itself.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line-symlink-to-dir</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when they link to directories and are given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--dereference-command-line</code>, <code>-H</code></dt>
|
||
<dd>
|
||
<p>Do not follow symlinks except when given as command line arguments.</p>
|
||
</dd>
|
||
<dt><code>--no-group</code>, <code>-G</code></dt>
|
||
<dd>
|
||
<p>Do not show group in long format.</p>
|
||
</dd>
|
||
<dt><code>--author</code></dt>
|
||
<dd>
|
||
<p>Show author in long format. On the supported platforms, the author always matches the file owner.</p>
|
||
</dd>
|
||
<dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>Do not ignore hidden files (files with names that start with '.').</p>
|
||
</dd>
|
||
<dt><code>--almost-all</code>, <code>-A</code></dt>
|
||
<dd>
|
||
<p>In a directory, do not ignore all file names that start with '.', only ignore '.' and '..'.</p>
|
||
</dd>
|
||
<dt><code>--directory</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>Only list the names of directories, rather than listing directory contents. This will not follow symbolic links unless one of <code>--dereference-command-line (-H)</code>, <code>--dereference (-L)</code>, or <code>--dereference-command-line-symlink-to-dir</code> is specified.</p>
|
||
</dd>
|
||
<dt><code>--human-readable</code>, <code>-h</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes (e.g. 1K 234M 56G).</p>
|
||
</dd>
|
||
<dt><code>--kibibytes</code>, <code>-k</code></dt>
|
||
<dd>
|
||
<p>default to 1024-byte blocks for file system usage; used only with -s and per directory totals</p>
|
||
</dd>
|
||
<dt><code>--si</code></dt>
|
||
<dd>
|
||
<p>Print human readable file sizes using powers of 1000 instead of 1024.</p>
|
||
</dd>
|
||
<dt><code>--block-size=<BLOCK_SIZE></code></dt>
|
||
<dd>
|
||
<p>scale sizes by BLOCK_SIZE when printing them</p>
|
||
</dd>
|
||
<dt><code>--inode</code>, <code>-i</code></dt>
|
||
<dd>
|
||
<p>print the index number of each file</p>
|
||
</dd>
|
||
<dt><code>--reverse</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>Reverse whatever the sorting method is e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.</p>
|
||
</dd>
|
||
<dt><code>--recursive</code>, <code>-R</code></dt>
|
||
<dd>
|
||
<p>List the contents of all directories recursively.</p>
|
||
</dd>
|
||
<dt><code>--width=<COLS></code>, <code>-w <COLS></code></dt>
|
||
<dd>
|
||
<p>Assume that the terminal is COLS columns wide.</p>
|
||
</dd>
|
||
<dt><code>--size</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print the allocated size of each file, in blocks</p>
|
||
</dd>
|
||
<dt><code>--color</code></dt>
|
||
<dd>
|
||
<p>Color output based on file type.</p>
|
||
</dd>
|
||
<dt><code>--indicator-style</code></dt>
|
||
<dd>
|
||
<p>Append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)</p>
|
||
</dd>
|
||
<dt><code>--classify=<when></code>, <code>-F <when></code></dt>
|
||
<dd>
|
||
<p>Append a character to each file name indicating the file type. Also, for regular files that are executable, append '*'. The file type indicators are '/' for directories, '@' for symbolic links, '|' for FIFOs, '=' for sockets, '>' for doors, and nothing for regular files. when may be omitted, or one of:<br /> none - Do not classify. This is the default.<br /> auto - Only classify if standard output is a terminal.<br /> always - Always classify.<br />Specifying --classify and no when is equivalent to --classify=always. This will not follow symbolic links listed on the command line unless the --dereference-command-line (-H), --dereference (-L), or --dereference-command-line-symlink-to-dir options are specified.</p>
|
||
</dd>
|
||
<dt><code>--file-type</code></dt>
|
||
<dd>
|
||
<p>Same as --classify, but do not append '*'</p>
|
||
</dd>
|
||
<dt><code>-p</code></dt>
|
||
<dd>
|
||
<p>Append / indicator to directories.</p>
|
||
</dd>
|
||
<dt><code>--time-style=<TIME_STYLE></code></dt>
|
||
<dd>
|
||
<p>time/date format with -l; see TIME_STYLE below</p>
|
||
</dd>
|
||
<dt><code>--full-time</code></dt>
|
||
<dd>
|
||
<p>like -l --time-style=full-iso</p>
|
||
</dd>
|
||
<dt><code>--context</code>, <code>-Z</code></dt>
|
||
<dd>
|
||
<p>print any security context of each file</p>
|
||
</dd>
|
||
<dt><code>--group-directories-first</code></dt>
|
||
<dd>
|
||
<p>group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-104"><a class="header" href="#examples-104">Examples</a></h2>
|
||
<p>List files and directories in the current directory, one per line, with details:</p>
|
||
<pre><code class="language-shell">vdir
|
||
</code></pre>
|
||
<p>List with sizes displayed in human-readable units (KB, MB, GB):</p>
|
||
<pre><code class="language-shell">vdir -h
|
||
</code></pre>
|
||
<p>List including hidden files (starting with a dot):</p>
|
||
<pre><code class="language-shell">vdir -a
|
||
</code></pre>
|
||
<p>List files and directories sorting entries by size (largest first):</p>
|
||
<pre><code class="language-shell">vdir -S
|
||
</code></pre>
|
||
<p>List files and directories sorting entries by modification time (newest first):</p>
|
||
<pre><code class="language-shell">vdir -t
|
||
</code></pre>
|
||
<p>List grouping directories first:</p>
|
||
<pre><code class="language-shell">vdir --group-directories-first
|
||
</code></pre>
|
||
<p>Recursively list all files and directories in a specific directory:</p>
|
||
<pre><code class="language-shell">vdir --recursive {{path/to/directory}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="wc"><a class="header" href="#wc">wc</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>wc [OPTION]... [FILE]...
|
||
</code></pre>
|
||
<p>Display newline, word, and byte counts for each FILE, and a total line if
|
||
more than one FILE is specified. With no FILE, or when FILE is -, read standard input.</p>
|
||
<h2 id="options-114"><a class="header" href="#options-114">Options</a></h2>
|
||
<dl><dt><code>--bytes</code>, <code>-c</code></dt>
|
||
<dd>
|
||
<p>print the byte counts</p>
|
||
</dd>
|
||
<dt><code>--chars</code>, <code>-m</code></dt>
|
||
<dd>
|
||
<p>print the character counts</p>
|
||
</dd>
|
||
<dt><code>--files0-from=<F></code></dt>
|
||
<dd>
|
||
<p>read input from the files specified by<br /> NUL-terminated names in file F;<br /> If F is - then read names from standard input</p>
|
||
</dd>
|
||
<dt><code>--lines</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>print the newline counts</p>
|
||
</dd>
|
||
<dt><code>--max-line-length</code>, <code>-L</code></dt>
|
||
<dd>
|
||
<p>print the length of the longest line</p>
|
||
</dd>
|
||
<dt><code>--total=<WHEN></code></dt>
|
||
<dd>
|
||
<p>when to print a line with total counts;<br /> WHEN can be: auto, always, only, never</p>
|
||
</dd>
|
||
<dt><code>--words</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>print the word counts</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-105"><a class="header" href="#examples-105">Examples</a></h2>
|
||
<p>Count all lines in a file:</p>
|
||
<pre><code class="language-shell">wc --lines {{path/to/file}}
|
||
</code></pre>
|
||
<p>Count all words in a file:</p>
|
||
<pre><code class="language-shell">wc --words {{path/to/file}}
|
||
</code></pre>
|
||
<p>Count all bytes in a file:</p>
|
||
<pre><code class="language-shell">wc --bytes {{path/to/file}}
|
||
</code></pre>
|
||
<p>Count all characters in a file (taking multi-byte characters into account):</p>
|
||
<pre><code class="language-shell">wc --chars {{path/to/file}}
|
||
</code></pre>
|
||
<p>Count all lines, words and bytes from <code>stdin</code>:</p>
|
||
<pre><code class="language-shell">{{find .}} | wc
|
||
</code></pre>
|
||
<p>Count the length of the longest line in number of characters:</p>
|
||
<pre><code class="language-shell">wc --max-line-length {{path/to/file}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="who"><a class="header" href="#who">who</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>who [OPTION]... [ FILE | ARG1 ARG2 ]
|
||
</code></pre>
|
||
<p>Print information about users who are currently logged in.</p>
|
||
<h2 id="options-115"><a class="header" href="#options-115">Options</a></h2>
|
||
<dl><dt><code>--all</code>, <code>-a</code></dt>
|
||
<dd>
|
||
<p>same as -b -d --login -p -r -t -T -u</p>
|
||
</dd>
|
||
<dt><code>--boot</code>, <code>-b</code></dt>
|
||
<dd>
|
||
<p>time of last system boot</p>
|
||
</dd>
|
||
<dt><code>--dead</code>, <code>-d</code></dt>
|
||
<dd>
|
||
<p>print dead processes</p>
|
||
</dd>
|
||
<dt><code>--heading</code>, <code>-H</code></dt>
|
||
<dd>
|
||
<p>print line of column headings</p>
|
||
</dd>
|
||
<dt><code>--login</code>, <code>-l</code></dt>
|
||
<dd>
|
||
<p>print system login processes</p>
|
||
</dd>
|
||
<dt><code>--lookup</code></dt>
|
||
<dd>
|
||
<p>attempt to canonicalize hostnames via DNS</p>
|
||
</dd>
|
||
<dt><code>-m</code></dt>
|
||
<dd>
|
||
<p>only hostname and user associated with stdin</p>
|
||
</dd>
|
||
<dt><code>--process</code>, <code>-p</code></dt>
|
||
<dd>
|
||
<p>print active processes spawned by init</p>
|
||
</dd>
|
||
<dt><code>--count</code>, <code>-q</code></dt>
|
||
<dd>
|
||
<p>all login names and number of users logged on</p>
|
||
</dd>
|
||
<dt><code>--runlevel</code>, <code>-r</code></dt>
|
||
<dd>
|
||
<p>print current runlevel</p>
|
||
</dd>
|
||
<dt><code>--short</code>, <code>-s</code></dt>
|
||
<dd>
|
||
<p>print only name, line, and time (default)</p>
|
||
</dd>
|
||
<dt><code>--time</code>, <code>-t</code></dt>
|
||
<dd>
|
||
<p>print last system clock change</p>
|
||
</dd>
|
||
<dt><code>--users</code>, <code>-u</code></dt>
|
||
<dd>
|
||
<p>list users logged in</p>
|
||
</dd>
|
||
<dt><code>--mesg</code>, <code>--message</code>, <code>--writable</code>, <code>-T</code>, <code>-w</code></dt>
|
||
<dd>
|
||
<p>add user's message status as +, - or ?</p>
|
||
</dd>
|
||
<dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-106"><a class="header" href="#examples-106">Examples</a></h2>
|
||
<p>Display the username, line, and time of all currently logged-in sessions:</p>
|
||
<pre><code class="language-shell">who
|
||
</code></pre>
|
||
<p>Display information only for the current terminal session:</p>
|
||
<pre><code class="language-shell">who am i
|
||
</code></pre>
|
||
<p>Display all available information:</p>
|
||
<pre><code class="language-shell">who -a
|
||
</code></pre>
|
||
<p>Display all available information with table headers:</p>
|
||
<pre><code class="language-shell">who -a -H
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="whoami"><a class="header" href="#whoami">whoami</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
<i class="fa fa-brands fa-linux"></i>
|
||
<i class="fa fa-brands fa-apple"></i>
|
||
<i class="fa fa-brands fa-windows"></i>
|
||
</div>
|
||
<div class="version">v0.0.19
|
||
</div>
|
||
</div>
|
||
<pre><code>whoami
|
||
</code></pre>
|
||
<p>Print the current username.</p>
|
||
<h2 id="options-116"><a class="header" href="#options-116">Options</a></h2>
|
||
<dl></dl>
|
||
<h2 id="examples-107"><a class="header" href="#examples-107">Examples</a></h2>
|
||
<p>Display currently logged username:</p>
|
||
<pre><code class="language-shell">whoami
|
||
</code></pre>
|
||
<p>Display the username after a change in the user ID:</p>
|
||
<pre><code class="language-shell">sudo whoami
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
<div style="break-before: page; page-break-before: always;"></div><h1 id="yes"><a class="header" href="#yes">yes</a></h1>
|
||
<div class="additional">
|
||
<div class="platforms">
|
||
</div>
|
||
<div class="version">v
|
||
</div>
|
||
</div>
|
||
<pre><code>yes [STRING]...
|
||
</code></pre>
|
||
<p>Repeatedly display a line with STRING (or 'y')</p>
|
||
<h2 id="options-117"><a class="header" href="#options-117">Options</a></h2>
|
||
<dl><dt></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
<h2 id="examples-108"><a class="header" href="#examples-108">Examples</a></h2>
|
||
<p>Repeatedly output "message":</p>
|
||
<pre><code class="language-shell">yes {{message}}
|
||
</code></pre>
|
||
<p>Repeatedly output "y":</p>
|
||
<pre><code class="language-shell">yes
|
||
</code></pre>
|
||
<p>Accept everything prompted by the <code>apt-get</code> command:</p>
|
||
<pre><code class="language-shell">yes | sudo apt-get install {{program}}
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
|
||
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
|
||
</blockquote>
|
||
|
||
</main>
|
||
|
||
<nav class="nav-wrapper" aria-label="Page navigation">
|
||
<!-- Mobile navigation buttons -->
|
||
|
||
|
||
<div style="clear: both"></div>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
|
||
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||
|
||
</nav>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<script>
|
||
window.playground_copyable = true;
|
||
</script>
|
||
|
||
|
||
<script src="elasticlunr.min.js"></script>
|
||
<script src="mark.min.js"></script>
|
||
<script src="searcher.js"></script>
|
||
|
||
<script src="clipboard.min.js"></script>
|
||
<script src="highlight.js"></script>
|
||
<script src="book.js"></script>
|
||
|
||
<!-- Custom JS scripts -->
|
||
|
||
<script>
|
||
window.addEventListener('load', function() {
|
||
window.setTimeout(window.print, 100);
|
||
});
|
||
</script>
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|