GNU Core Utilities (coreutils) is a set of basic Unix command-line utilities

learn more… | top users | synonyms

0
votes
2answers
251 views

/usr/bin/realpath not found in Centos 6.5

I'm trying to type 'realpath' in CentOS 6.5. But it seems not installed. I checked it is contained in coreutils (archlinux). I double check the coreutils package which provide by CentOS, it lack the ...
0
votes
2answers
244 views

Unable to get ls to recognise LS_OPTIONS or LS_COLORS?

Trying to get --color=auto as the default ls argument. $ ls --version ls (GNU coreutils) 8.21 … $ echo $LS_COLORS ...
6
votes
3answers
446 views

How does `wc -l` work?

I have to read a large file and before I start reading it, I need to know the total number of lines in the file (which are in millions). I have implemented a lot of solutions and have found one. But ...
3
votes
1answer
522 views

`locate` wildcard strange behavior - why?

locate "*.png" returns all files ending with .png, as expected. locate "test.*" doesn't return anything, but there are files named test in my system. locate "*test" returns all files ending with ...
1
vote
1answer
47 views

What does GNU tar “--restrict” option actually restrict?

The manual of GNU tar only states that --restrict: --restrict disable use of some potentially harmful options Can anyone elaborate on what are these "harmful" options? I could not ...
3
votes
2answers
446 views

Why is xargs necessary?

Suppose I want to remove all files in a directory except for one named "notes.txt". I would do this with the pipeline, ls | grep -v "notes.txt" | xargs rm. Why do I need xargs if the output of the ...
0
votes
1answer
38 views

Why does “head -3” give the same results as “head -n 3”?

I'm interested in why head works as it works with given parameters, i.e. head -3 produces the same output as head -n 3?
1
vote
1answer
3k views

Linux: ls -l prints only question marks:

I have a problem with listing of some directory with ls -l: $ ls -l ./directory -????????? ? ? ? ? ? file001.txt -????????? ? ? ? ? ? file002.txt and just ls works good: $ ls ...
1
vote
1answer
110 views

Recursively searching for specific text inside specific files but only in specific folders

I have a nested folder structure containing lots of folders and files. How do I search inside files for a pattern eg "sampletext", but only if the filename matches a pattern (eg only search inside ...
3
votes
4answers
2k views

Where is the information retreived by “uname” stored?

Uname utility in *nix retrieves wonderful meta information about the machine. Where is this information stored?
0
votes
3answers
478 views

df -h showing wrong output in GB

If I list df output for KB, MB and GB, they do not match e.g. $ df -k |grep xvdb /dev/xvdb1 12796048 732812 11413172 7% /xxx $ df -m |grep xvdb /dev/xvdb1 12497 ...
2
votes
2answers
3k views

Display filesystem's free space available to the root user

By default, Linux reserves some fraction of a filesystem for the root user, at least on ext4 (to prevent ordinary users from filling the drive completely and crashing the system, and to reduce ...
0
votes
1answer
234 views

gnu coreutils split verbose flushed?

When using the GNU coreutils split command with verbose mode, how can I make the lines that appear in the STDOUT be flushed with respect to the time when the file has finally been created? Fore ...
0
votes
1answer
172 views

using coreutils split file into pieces to different directories?

How can I use GNU's coreutils split command to split a large file into pieces of L number of lines each, but putting each of the different subfiles into different directories at the same time they are ...
2
votes
1answer
73 views

Prompt a user and wait for response

In GNUwin32 or UnxUtils, is there a way to prompt a user to "Press enter to continue" and wait for the enter key, such as the unix 'read' command. I used to have an old command 'ask' that would do ...
20
votes
2answers
1k views

What is /usr/bin/[ and how do I use it?

I was looking at coreutils and found this as one of the files included as part of coreutils: /usr/bin/[. What is [ and what does it do? It is an executable. I just don't know what it does or how to ...
0
votes
2answers
414 views

How can I have ls follow the content of a directory like tail -f does on a file

I want to basically continuously update the file list of a directory similar to how tail does with the -f flag on a file. is there any reasonable way to do this?
9
votes
1answer
2k views

How can I install a more modern version of GNU utils (coreutils) on Debian Linux with no admin rights?

I would like to install a more modern version of GNU utils (coreutils) on a debian linux system where I have no admin rights. Is there a way to do that? The rationale is that I need a more modern ...