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.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
223 views

Understanding fmt (gnu coreutils)

I'm using fmt (GNU coreutils) 8.25 and I fail to understand how to use it. In particular, I don't understand the following results. $ echo -n "a b c d e" | fmt -w3 -g3 I expected to obtain a b c d ...
4
votes
0answers
4k views

logname: no login name

I am trying to understand the differences between logname and LOGNAME from Difference between logname and $LOGNAME and https://askubuntu.com/questions/490620/difference-between-logname-and-logname On ...
2
votes
0answers
43 views

Are there any "richer" alternatives to cp and mv (like bat to cat and exa to ls)?

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 ...
2
votes
0answers
328 views

sort --check: continue past first disorder

I would like to get a list of all the places in a large file where the keys decrease from a previous line. I can check if the file is sorted using sort: sort -cns -k1.14,1.15 -k1.1,1.10 file.txt ...
2
votes
1answer
509 views

Installed coreutils on CentOS for sort --human-readable flag but it still doesn't work

I'm trying to do du -h | sort -h, but my CentOS 5.7 doesn't have -h flag for sort. So I installed coreutils Updated: coreutils.x86_64 0:5.97-34.el5_8.1 Complete! yet sort still doesn't have ...
1
vote
0answers
62 views

Is jq internal sort slower than GNU sort?

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] ...
1
vote
1answer
134 views

What is %z useful for in GNU date?

I'm in the UK running these 2 commands (using gdate as I'm on a Mac with date (GNU coreutils) 8.32 installed): # A UK winter date, timezone in UK at this time is GMT = UTC $ gdate '--date=TZ="...
1
vote
0answers
43 views

Inconsistent output of cp -v command between machines

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 ...
1
vote
1answer
1k views

`du -sh` and `du -sb` gives different result when file being accessed?

I set up a file server with samba and I'm copying files to it from another computer under the same LAN. I set up SSH server and connected to it with my phone to monitor the process. This is what I ...
1
vote
0answers
151 views

Why does after move I can get sync to work but not after cp -r *?

I have seen this happen multiple times. For example, I move a hypothetical file to a the usb disk. $ mv somefilename.someext /media/shirish/Seagate/sometilename.someext after this I simply say sync ...
0
votes
0answers
44 views

How to treat a symbolic link as a file itself (instead of the one it points to)?

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 ...
0
votes
0answers
49 views

Filter out items that belong to the Source Packages

Here I have a Manifest of Ubuntu I would like to list out only the Source Packages and not the containing items. binutils 2.31.1-6ubuntu1 binutils-common:amd64 2.31.1-6ubuntu1 binutils-x86-64-...
-1
votes
1answer
51 views

What happens if I specify nonexisting join field(s) for one or both of the input files?

I have two files $ cat file1 c c1 b b1 $ cat file2 a a2 c c2 b b2 What happens if I specify nonexisting join field(s) for one or both of the input files? Why do the following outer joins generate ...
-2
votes
1answer
220 views

Does mv not remove transferred files from source while other files are still in transfer?

I am moving 100G files from an external hard drive to another external hard drive, mv /external/hdd1/sourcedir /external/hdd2/destdir While it is in process, I found that the files copied to the ...