4
votes
2answers
258 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
103 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
130 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
236 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
1k 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
860 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 ...
4
votes
3answers
2k views

How can I display octal notation of permissions with ls - and can octal represent all permissions? [duplicate]

After looking at the man page for ls on my system and searching Google, I see there IS a hack of way to use awk or perl to show octal permissions when using ls, but with bash is there anything more ...
12
votes
2answers
241 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
444 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
568 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
2k 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
4k 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 ...