4
votes
2answers
348 views

What does `du - hb` do?

With du -bh I think I get the apparent size in human readable format: # du -bh 295K ./test However, I would expect the same from du -hb, but I get something else: # du -hb 301926 ./test I ...
0
votes
1answer
141 views

what does the following command do?

what does the following command do? I have tried to study the linux command but I could not find out what this command does. here is the command: touch finger ; finger touch
3
votes
2answers
441 views

cp -L vs. cp -H

Problem When copying files with cp -H or cp -L, I get the same results: $ ls -l fileA fileA -> fileB $ cp fileA somewhere/ -H $ ls -l somewhere/ fileA # fileA is a copy of fileB, only ...
4
votes
3answers
3k views

convert soft- to hardlinks with cp

The cp command's infopage offers on the option --preserve= the following: links Preserve in the destination files any links between corresponding source files. Note that with -L' ...
3
votes
1answer
4k views

Command to transpose (swap rows and columns of) a text file [duplicate]

Is there currently a generic command that will "pivot" input. e.g. #labeled.file name: bob title: code monkey name: joe title: pointy haired is converted to: name title bob code monkey joe ...
1
vote
3answers
2k views

ls command - define number of columns

Is there a way to define the number of columns in ls output? I got this far: ls -C sorts in columns and ls -1 produces one column. --tabsize = option to produce two columns resulted in what looks ...
12
votes
2answers
258 views

`test` and `[` - different binaries, any difference?

I noticed while answering another question that test and [ are different binaries, but the [ manpage pulls up test's. Besides the requirement for an ending ], is there any difference? If not, why are ...
2
votes
1answer
514 views

Why does unlink(1) support only one file?

I'm used to commands supporting multiple filename arguments if possible, but unlink doesn't: %> unlink a b unlink: extra operand `b' Try `unlink --help' for more information. I ended up using a ...
9
votes
2answers
570 views

What languages are used to build Unix commands?

Examples of commands I'm referring to are ls, pwd, and cd. Also, how are these built? Do you have an example?
9
votes
4answers
3k views

Any options to replace GNU coreutils on Linux?

I've been thinking about discontinuing the use of GNU Coreutils on my Linux systems, but to be honest, unlike many other GNU components, I can't think of any alternatives (on Linux). What alternatives ...
5
votes
3answers
8k views

Storing output of command in shell variable

I have an operation using cut that I would like to assign result to a variable var4=echo ztemp.xml |cut -f1 -d '.' I get the error: ztemp.xml is not a command The value of var4 never gets ...