Skip to main content

Questions tagged [coreutils]

formally GNU Coreutils is a set of basic utilities from text, files and shell utilities. Most of the Unix-like OS contains this package. Question about any of the utilities of the coreutils should use this tag.

Filter by
Sorted by
Tagged with
598 votes
25 answers
1.1m views

How to show the transfer progress and speed when copying files with cp?

Otherwise, is there any alternative command line utility that can achieve this?
Olivier Lalonde's user avatar
477 votes
7 answers
1.3m views

What does "cp: omitting directory" mean?

I've issued the following command: sudo cp ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/ When I do this, I start getting the following messages: cp: ...
MEM's user avatar
  • 11.1k
214 votes
8 answers
420k views

Is there a way to create multiple directories at once with mkdir?

If I wanted to create multiple directories (on the same level) and then feed it a comma seperated list of directory names (or something to that effect)?
BGroat's user avatar
  • 2,315
92 votes
5 answers
96k views

Difference between 'dir' and 'ls' terminal commands?

I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional UNIX method of viewing the files in a directory, and that dir is the windows ...
BretD's user avatar
  • 1,258
31 votes
4 answers
6k views

Why wouldn't the `which` command work for `cd`? I can't find the executable for `cd` either!

I tried which cd and it didn't give a path but instead returned the exit code 1 (checked with echo $?). The coreutil cd itself is working, so the executable should be there, right? I also ran a find ...
rusty's user avatar
  • 16.4k
17 votes
4 answers
6k views

Use sleep with minutes and seconds

I know how to use sleep 5m for 5 minutes. How would I use it for say 7 mins 30 seconds?
fixit7's user avatar
  • 3,147
13 votes
4 answers
8k views

How can I have mkdir cd into the newly-created directory? [duplicate]

Frequently, I type these commands in bash: mkdir something cd something I almost never do this: mkdir something ls # something in the current directory, not ./something/ And never this: mkdir ...
user avatar
12 votes
1 answer
859 views

Understanding output of command: date -d "12:24 <lower-case-alphabet>"

Can someone please help me understand why adding any lower-case-alphabet (a-z) as below makes a difference in date -d output and what do these letters in that command mean? wip$ date -d "12:24 a&...
c10's user avatar
  • 123
10 votes
2 answers
13k views

lint: command not found

Does Ubuntu have a lint utility? How is it installed? In computer programming, lint is a Unix utility.. https://en.wikipedia.org/wiki/Lint_%28software%29 thufir@mordor:~$ thufir@mordor:~$ gcc ...
Thufir's user avatar
  • 4,571
9 votes
1 answer
7k views

How to upgrade coreutils from 8.21 to 8.24 in Linux Ubuntu 14.04?

I want to use the 'progress' status option with dd which is available with coreutils 8.24 up. Ubuntu 14.04 (Trusty) has coreutils 8.21 and the current (stable) release for coreutils is >8.24. I wish ...
solyarist's user avatar
  • 193
8 votes
5 answers
16k views

how do I check coreutils version?

How do i check the version of coreutils? gnu coreutils says they are at version 5. Im sure Ubuntu is a variation on that. I tried: info coreutils File: coreutils.info, Node: coreutils invocation, ...
j0h's user avatar
  • 14.9k
8 votes
2 answers
9k views

What does `ls --author` mean?

What exactly means ls --author It really returns writer of a file or owner? How to set author for a file? I have to implement this part (ls --author), so need to know what exactly it is.
shantanu's user avatar
  • 8,637
8 votes
2 answers
844 views

touch -t errors on last Sundays of March

touch -t is giving me "invalid date format" errors if the date code represents 2:00:00AM through 2:59:59AM on the last Sunday in March of any year (I've checked 2023,2014,2016,2018). The ...
Schroeder's user avatar
  • 201
6 votes
1 answer
1k views

Head with a weird behavior

I have downloaded a warc file from Common Crawl in Ubuntu 18.04. After decompressing it with gzip, I've tried to get a segment of the file using head. I first tried: head -c 29 CC-MAIN-20210620114611-...
rvbarreto's user avatar
  • 389
6 votes
4 answers
15k views

`rm -rf ` and `rm -r` have the same results

Bear in mind that I just learning bash so please explain in moderate terms. rm -rf and rm -r appear to do the same thing. The tutorial (https://help.ubuntu.com/community/Beginners/BashScripting) ...
Starfox64's user avatar
6 votes
2 answers
12k views

how to make a static binary of coreutils?

I'm trying to make a static binary of rm, so I tried compiling coreutils with configure; make SHARED=0 CC='gcc -static'; make install but I keep running into errors. First make complains about c99 ...
Nicolas Mommaerts's user avatar
5 votes
2 answers
544 views

rm -I to prevent accidental rm

I just created alias rm="rm -I" to prevent from accidental rm command. -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while ...
Sourabh's user avatar
  • 1,791
4 votes
2 answers
293 views

multiple forms of sum in core utilities

Upon reading GNU Core Utilities - Wikipedia, I find multiple sum me@alpha:~$ cksum nohup.out 4104911401 101860700 nohup.out me@alpha:~$ b2sum nohup.out ...
Alice's user avatar
  • 1,720
4 votes
3 answers
4k views

Why is /bin/true such a large file? How would I find the source code?

I just found out about /bin/true yesterday. I'm not a bash power user by any means, but I decided to check it out. I was surprised to find that it is a 22K file (Ubuntu 12.04), and not one of the ...
Steve Koch's user avatar
3 votes
1 answer
4k views

how to compile the sorcecode of the offical ls.c source code?

I downloaded the official ls.c source code and tried to compile it with gcc. The problem was that the gcc showed me a lot of errors. $ gcc ls.c -o ls ls.c:38:20: fatal error: config.h: I did fix a ...
qibra's user avatar
  • 31
3 votes
1 answer
362 views

Bash sort lines starting with punctuation in non-dictionary order

I have a file containing lines, some of which start with a ! character, some with a ? character, and some with a space ( ) character. The second character is always a letter of the alphabet. When I ...
Tasos Papastylianou's user avatar
3 votes
1 answer
3k views

What is the difference between cut’s -b and -c option?

I've searched online for examples, went through the reference manual of the cut command and tested it myself and remain unsure about the -b flag. There aren't any clear examples as to how the cut -b ...
ghost's user avatar
  • 41
3 votes
2 answers
21k views

How can I change the default date format (using LC_TIME)?

How do I change the format of date command by modifying LC_TIME in locale? Currently the day of month uses %e format. I need it to be displayed in %d format. Below is the Current Format: #date Thu ...
Gowtham's user avatar
  • 311
3 votes
1 answer
2k views

Copying multiple files with progress

I want to be able to copy multiple files from multiple USB flash disks at the same time, being able to see current transfer rate of each simultaneously. It is part of performance testing for USB port ...
Hamzahfrq's user avatar
  • 163
2 votes
2 answers
1k views

Is it possible to uninstall the 'programs' rm, cp and mv from the system?

I can't see how this would be useful, but I'm really interested. Is it possible to uninstall the programs rm, cp and mv?
Exeleration-G's user avatar
2 votes
1 answer
5k views

Install env command

I want to use env, but Ubuntu tells me it is not installed. If I try to install it, Ubuntu tells me there is nothing to do. How to fix this? $ env The program 'env' is currently not installed. You ...
Jan Weidner's user avatar
2 votes
1 answer
252 views

Why is test --help not working?

My Ubuntu is working good. $ lsb_release -a LSB Version: core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch Distributor ID: Ubuntu Description: Ubuntu 22.04.1 ...
Adam's user avatar
  • 379
2 votes
1 answer
6k views

How to replace GNU core utilities with Busybox

I was wondering: is it possible to replace the GNU coreutils with Busybox in Ubuntu? Is that safe? Could I replace something else (like binutils and bash) with Busybox? How much free disk space would ...
Eduardo Cola's user avatar
  • 5,837
2 votes
1 answer
6k views

I can't get the `cp` command to work

In the terminal, when I issue the cp command, it states: The program 'cp' is currently not installed. You can install it by typing: apt-get install coreutils But when I try to install it, I get the ...
Logan Herald's user avatar
1 vote
2 answers
330 views

rm file '??q:q '

I accidently created a file named ??q:q and i can't remove it. rm '??q:q' or rm '\?\?q\:q' (To escape the ?) says No such file or directory Another interesting thing: in ls it shows the name as ??q:...
0xAffe's user avatar
  • 297
1 vote
1 answer
2k views

Does mv ignore the letter case by default?

I'm trying to change only the case in the filename and getting the error: ayakovlev@ubuntu:~/host$ mv crc32.hpp CRC32.hpp mv: ‘crc32.hpp’ and ‘CRC32.hpp’ are the same file Is it any setting ...
HEKTO's user avatar
  • 575
1 vote
1 answer
4k views

How can I install a debug build for coreutils?

I am trying to install the debug build for coreutils package which is not available. I also went through this link and followed all steps but I still can't see a debug package for coreutils on doing ...
abhi's user avatar
  • 321
1 vote
1 answer
2k views

How to repair missing GPG public keys for packages

Earlier today I was removing VirtualBox, and when removing its public key, I accidentally instead of putting the key ID, put the fingerprint: sudo apt-key del 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B ...
user avatar
1 vote
1 answer
285 views

Change TimeStamp display in terminal

When I do a ls -al the timestamp display is Month date time - would like it to be yy/mm/dd or just know WHERE to modify this? I also cannot edit dconf-editor. - that shows %l:%M %p when I try to ...
Scott's user avatar
  • 11
1 vote
1 answer
315 views

Why does `/usr/bin/time` report the wrong exit status with format `%x` in case of SIGABRT?

I'm using /usr/bin/time to report information about a set of benchmarks I'm running. The interesting data points are runtime, memory usage and the exit status. This works fine except when the ...
Stefan's user avatar
  • 13
0 votes
2 answers
602 views

where is the source code for the which command?

I looked around in coreutils, and did sudo apt-cache search which I also looked at the manpages of which, I didn't find it. I'd like to add an argument for listing dependencies to the executable, I ...
j0h's user avatar
  • 14.9k
0 votes
1 answer
342 views

why is /bin/ls linking to libpthread?

so strange, is ls multi-threaded somehow? what could ls possibly need libpthread for? ldd /bin/ls linux-vdso.so.1 (0x00007ffff7fce000) libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so....
hanshenrik's user avatar
0 votes
2 answers
1k views

"which alias" and "whereis alias" doesn't return anything [duplicate]

I recently installed Ubuntu 20.04. I am unable to find the alias command. When I enter which alias I get nothing back. Same with whereis alias.
BlindStevie's user avatar
0 votes
3 answers
999 views

How to get number of phy / logical cores?

There are a lot of questions about number of cores, e.g. , but none give the correct logical cores AFAIK. The best thing I can think of, is calculating myself using the following formulas: Physical ...
CIsForCookies's user avatar
0 votes
2 answers
198 views

mesg return 'is y'

Upon issuing 'mesg' me@alpha:~$ mesg is y The manual states NAME mesg - display (or do not display) messages from other users Does this means that someone hacked my machine and leave a ...
Alice's user avatar
  • 1,720
0 votes
1 answer
93 views

Different versions of `sync` tool

There are two man pages about the sync tool: (1) http://man7.org/linux/man-pages/man1/sync.1.html NAME sync - Synchronize cached writes to persistent storage SYNOPSIS top ...
Antonio's user avatar
  • 103
0 votes
1 answer
90 views

How to fix cursed machine with broken recovery mode and broken GNOME

Recovery mode shows a screen that apparently can't find dpkg/apt/any coreutil executables: here, GNOME crashes after login attempt with correct password, systemctl status gdm shows: Nov 02 16:38:19 (...
Averse ABFun's user avatar
0 votes
1 answer
123 views

Inconsistence between CLI command and nautilus units

So it seems nautilus/Files and other software are using the SI units to display file size for some time now, in ubuntu. But this is rather inconsistent with cli command like ls, du,and df that still ...
solsTiCe's user avatar
  • 9,271
0 votes
1 answer
76 views

Please explain the copy backup types

The following options are available for the --backup option: none, off never make backups (even if --backup is given) numbered, t make numbered backups existing, nil numbered if ...
user58446's user avatar
  • 113
0 votes
1 answer
411 views

realpath API returns error 22(Invalid arg) or 38(function not implemented) on latest Ubuntu 21.04 & other latest linux flavours

sachin@sachin:~$ cat 1.c #include <limits.h> /* PATH_MAX */ #include <stdio.h> #include <stdlib.h> #include <errno.h> void main(void) { char *buf=NULL; char *res =...
Sachin Joshi's user avatar
0 votes
0 answers
119 views

users and who return no usernames

Strange thing happened today. I went to look up who was currently logged in on a box using the users command and it returned nothing. It didn't even return my username. The particulars are below. I am ...
Rich Maes's user avatar
  • 101
0 votes
0 answers
2k views

Ubuntu Cannot reinstall coreutils

I deleted the usr/bin/env file in my Ubuntu16.04 by mistake. Everytime i try to reinstall coreutils with this command: sudo apt-get install --reinstall coreutils, i get this error: Reinstallation of ...
opeonikute's user avatar
-1 votes
1 answer
9k views

cp: invalid option -- '/' [closed]

I am trying to recover my encrypted folder by using ubuntu live cd, I have done all the steps now all I want to do is to copy my /tmp/ecryptfs.bM59alvG to /home/ubuntu/myfolder directory. I am using ...
pushpendra chauhan's user avatar