Skip to main content

Questions tagged [coreutils]

GNU Core Utilities are the GNU project's implementation of the core command-line tools of a POSIX system, including tools like ls, cp, mv, rm, etc.

Filter by
Sorted by
Tagged with
4 votes
2 answers
488 views

So, ls -R is a command I use a lot to quickly verify the file structure of my projects, or check for any leftover files, as it's simple enough to use and read, and is part of coreutils (which means I ...
Yunara's user avatar
  • 41
14 votes
1 answer
747 views

I observe that, on Ubuntu 24.04.2 with coreutils version 9.4-3ubuntu6, running: $ tail -c 4097 /dev/zero $ echo $? 0 exits immediately with a status code of 0. I expected the command to block ...
Isidro Arias's user avatar
1 vote
0 answers
41 views

On Msys2 env.: $ cd /c/msys64/mingw64/lib/ $ ln -s libz.dll.a libzlib.dll.a But confusingly why ln command did copy instead of linking it symbolically ? $ ls -l libz* -rw-r--r-- 1 abdu None 108700 ...
Dumb's user avatar
  • 11
0 votes
1 answer
180 views

I have a multi-gigabyte text file and I want to replace all occurrences of utf8mb4_0900_ai_ci in it with utf8mb4_unicode_520_ci. Usually, I’d use sed -i for this as suggested here: find and replace a ...
ScottishTapWater's user avatar
0 votes
0 answers
96 views

What might be a reason that BSD cp and find don't "like" a trailing slash for directory names? | | cp | mv | |-----|--------------------------|...
jsx97's user avatar
  • 1,377
1 vote
2 answers
148 views

There have been multiple questions asked about this, like Understanding ls output, What are columns in ls -la?, What does 'ls -la' do?, What do the fields in ls -al output mean?, etc.. I've also come ...
TrisT's user avatar
  • 121
2 votes
1 answer
200 views

Scenario: # on Linux $ cat r456.txt e+e+l e+e-c $ cat r456.txt | sort e+e-c e+e+l $ sort --version sort (GNU coreutils) 8.30 # on Cygwin $ cat r456.txt e+e+l e+e-c $ cat r456.txt | sort e+e+l e+e-...
pmor's user avatar
  • 757
2 votes
2 answers
196 views

I see there are two different utilities in Linux manpages and I don't understand the difference. There is sync(1) and sync(8), and they look eerily similar. https://linux.die.net/man/8/sync https://...
Karel Bílek's user avatar
  • 2,069
0 votes
1 answer
120 views

Can someone elaborate on this description in the official docs? When copying from a symbolic link, cp normally follows the link only when not copying recursively or when --link (-l) is used.
joe's user avatar
  • 53
2 votes
0 answers
929 views

Tl;dr I need to mock info about CPU architecture on the server for testing purpose. The only way that I can achieve it, is by changing info source about CPU architecture, that is used by lscpu command ...
mindgod's user avatar
  • 21
5 votes
2 answers
8k views

Before you hit me with the obvious, I know, the backup option makes a backup of a file. But the thing is, the cp command in general backs up a file. One could argue a copy of a file is a backup. So ...
backslash enn's user avatar
-4 votes
3 answers
912 views

Why is there no summary option in coreutils ls command, like MS-DOS/Windows has? With summary option I mean: count the files and dirs and sum up their sizes. Update: It should read: "Even DOS/...
bashianer's user avatar
  • 151
2 votes
0 answers
286 views

mv is implemented as a simple rename() whenever possible, falling back to copy-then-delete whenever renaming doesn't work. In practice (but not in theory), these two cases correspond to source and ...
smheidrich's user avatar
0 votes
2 answers
170 views

How to use cp -u to only copy if content is different, it fails when doing as below $ cd /tmp/exper ; cp -v ~/Downloads/C/test.c . ; sudo chmod -R 777 . /home/budi/Downloads/C/test.c -> 'test.c' $ ...
user avatar
0 votes
3 answers
218 views

seq "prints a sequence of numbers to standard output", and, as far as I know, it can only increment the counter by adding. For instance, seq 0 3 10 0 3 6 9 tells seq to count from 0 to 10 ...
Clément's user avatar
  • 410
9 votes
3 answers
4k views

I want to have a script to automatically move all files into a directory structure that I have in place (it looks like ~/jpg, ~/png, ~/mp3, ~/zip, and so on).  So far, this is almost doing exactly ...
user69136's user avatar
  • 113
3 votes
1 answer
204 views

I want to create a relative symlink pointing to a relative symlink, not to the relative symlink's target. It seems that when creating a relative symlink ln resolves TARGET instead of pointing to the ...
matt's user avatar
  • 547
0 votes
3 answers
1k views

Is there a Linux command that can remove the first character on the first line for every file in a folder, and then save it? Many online resources cover doing this for every line instead of just the ...
ojbqa's user avatar
  • 3
2 votes
1 answer
165 views

I can't find any reference of this change of behaviour $ mkdir --version mkdir (GNU coreutils) 9.0 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <...
Jon's user avatar
  • 123
4 votes
0 answers
1k views

ls has exa. cat has bat. I don't know of a direct alternative to rm, but it also has rmtrash. All of these can usually work as drop-in alias replacements, retaining usual function and options of their ...
Atai Ambus's user avatar
2 votes
1 answer
1k views

Out of curiosity i wanted to open a symlink as itself instead of the file it points to, just to see how it looks like. While there are ways to see what file it points to like using readlink and ways ...
Carla only proves trivial prop's user avatar
1 vote
0 answers
648 views

While filtering through this json file I did a benchmark and found out utilizing jq's internal sort and unique method is actually 25% slower than sort --unique! Command Mean [ms] Min [ms] Max [ms] ...
Zeta.Investigator's user avatar
0 votes
4 answers
448 views

What timedate value is always greater than any timedate? In a script, I want to provide an argument to variable duration so that the loop will run forever until I kill the process: # `duration` has a ...
Mary's user avatar
  • 1
0 votes
2 answers
95 views

In terminal, the output of the lines TZ="Australia/Broken_Hill" date -d '2021-4-26 09:29' TZ="Australia/Broken_Hill" date -d '2021-4-26 09:29' +%Z is Mon Apr 26 09:29:00 AM ACST ...
Chris's user avatar
  • 3
1 vote
0 answers
57 views

On two different machines I maintain, cp -v's output is different. On one box, both src and dest are quoted, on another box, the first quote around both src and dest is a backtick: Box one (recent ...
wzzrd's user avatar
  • 3,770

1
2 3 4 5