small programs used on the command line to do a specific job
0
votes
0answers
54 views
What's the problem with fsck.ext3?
It seems there is some problem with my HDD in my satellite box. The box records to and plays video from the HDD, but occasionally it hangs (it was stable before). It's Linux version ...
20
votes
2answers
394 views
Why use install rather cp and mkdir?
I've seen in many places used install -d to create directories and install -c to copy a file. Why not use mkdir and cp? Is there an advantage in using install?
27
votes
3answers
1k views
What is the point of the `yes` command? [duplicate]
This question concerns the yes command found in UNIX and Linux machines: Basically, what is the point (if any) and history of this tool? Are there practical applications for it? Can an example be ...
1
vote
3answers
147 views
Count tabs per line in text file with utils
I have a tab-tabulated file.
I would like to check if every line has the same number of tabs.
For first step, I'd like to print the number of tabs for each individual line.
I've tried grep -o '\t' ...
2
votes
2answers
49 views
Is there a distribution-independent tool to autocompile+install dependencies?
I like the way e.g. ArchLinux' yaourt (or if you're not that lazy, abs+makepkg; and from what I read so far, Gentoo's ebuild as well) automatically take care of obtaining, compiling and installing ...
2
votes
2answers
80 views
When do `sort -k 2,3b` and `sort -k 2,3` differ?
The POSIX description of the -b flag for the sort command is
Ignore leading characters when determining the starting and ending positions of a restricted sort key.
I can understand the use for ...
5
votes
1answer
86 views
`unbuffer` or `stdbuf` for removing stdout buffering?
Is there a difference between unbuffer(1) and stdbuf(1)? From what I gather, unbuffer makes more than the "best effort" of calling the libc function set(X)buf at the beginning, and then letting things ...
2
votes
1answer
45 views
Checking the order of items in a shell environment variable
I am wanting to check that a certain directories always appear after other directories in an environment variable.
List items are separated by a colon, as with the PATH variable.
This is not simply ...
7
votes
2answers
98 views
Why is there a mix of symlinks and hardlinks in /bin?
I understand the technical difference between symlinks and hardlinks, this is a question about their use in practice, particularly I'm curious to know why both are used in seemingly similar ...
0
votes
0answers
30 views
Determine which memory stick contains an address?
I just run memtester and found a single error:
FAILURE: possible bad address line at offset 0x869a3bd8.
I can re-run memtester with individual memory sticks to determine which one is bad, but I ...
1
vote
1answer
121 views
Is there any tool to view live statistics about a Radeon GPU?
I've checked out GPU usage monitoring (CUDA), but are there similar tools for AMD/ATI cards? Or kind of universal tools? I want to check out if my applications use the 256 MB of RAM of the video card ...
2
votes
2answers
177 views
Where can I find some good documentation for bash printf?
man printf, info printf and printf --help are all pretty useless to me; I want an explanation of the FORMAT options. For example, I could use:
printf '%s\n' foo bar
and get output:
foo
bar
From ...
4
votes
5answers
166 views
Standard unix util to split “foo.bar.baz” into “foo.bar” + “.baz”?
I want to split a string $basename, containing the output in two parts, $stem and $ext, such that:
the string "${stem}${ext}" is identical to the original string $basename;
either $stem or $ext may ...
0
votes
1answer
97 views
wc - setting a terminating character
I've got that far: wc --files0-from=FILE lets one get the word count of a list of files. Each entry in this list mus be terminated with an ASCII NUL character.
Question: A way to set a terminating ...
1
vote
4answers
273 views
crash shell: any way to check if a command executed Successfully
I'm automating a test using crash package. Is there some thing like $?, which can be used to check if the previous command executed successfully or not inside a crash shell?
For example, when ...
2
votes
1answer
87 views
Is there a text-only equivalent (no curses) of `zenity --question`?
For my mercurial commit hook, I want to run my test cases and be asked whether I really want to commit if any of the tests fail. I'm thinking something like <run-the-tests> || ...
1
vote
1answer
102 views
Is Mac OS X really SUS compliant?
Internet says that Mac OS X 10.8 has achieved certification to The Open Group UNIX® 03 standard and that it is a compliant system.
But a simple test with echo seems to indicate otherwise:
a) The ...
1
vote
1answer
345 views
Install vmware-tools using yum in vmware fusion
I added vmware-tools repo [1] to my virtual CentOS box. What is the exact set of packages I have to install?
The rationale is to be able to update vmware-tools using yum.
Environment:
Host OS: Mac ...
-1
votes
1answer
235 views
using tr -t command [comprehension question]
When using tr -t command, string1 should be truncated to the length of string2, right?
tr -t abcdefghijklmn 123 # abc... = string1, 123 = string2
the cellar is the safest place # actual ...
3
votes
2answers
137 views
tac command's option creates strange output [comprehension question]
Say I have this file, containing nothing but
a
b
c
b
a
Using tac --separator=a file in BASH [on a Debian based Linux], I get this:
# empty line
# empty line
b
c
...
9
votes
3answers
548 views
Universal extractors
With an increasing number of archive/compression file formats, is there a single free/open-source command line tool to rule them all? Perhaps something with a consistent / unified set of flags? (note ...
1
vote
3answers
494 views
How to check which process is using a given file descriptor?
Somewhere in the middle of my application, the framework I'm using (ROOT) gives me the following error:
*** Break *** write on a pipe with no one to read it
SysError in ...
0
votes
3answers
460 views
ASCII art generator
I'm looking for an ASCII art generator (text is preferred, but images will do too) in the sl style, but with text instead of trains. Any suggestion?
4
votes
1answer
72 views
Determine monthly internet transfer to detect right FUP
I live in a country where many ISP (internet service providers) have FUP (fair use policy, limit on amount of data transferred). I need to get a new connection and I would like to measure how much ...
3
votes
4answers
227 views
Decomposition of path specs into longest-common-prefix + suffix
Given any two absolute Unix path specs1, one could decompose each spec as the concatenation of a longest common prefix and a specific suffix. E.g.,
/abc/bcd/cdf -> /abc/bcd + cdf
...
0
votes
0answers
63 views
lshw takes to much time in the when running it the Domain-0 of a Xen server
I have a server running Debian 6 with Xen. I logged in its Domain-0 and I run lshw short but it takes to much time. More than 10 minutes. So I kill the process. The server is OK, but I don't know why ...
1
vote
1answer
205 views
lspci machine-readable format (-vmm) does not show a kernel Module/Driver line
I briefly read the manual of lspci, where I found out that there is a machine-readable format lspci output using "-m" or "-mm" or "-vmm".
I need to print out the device name, the device id and the ...
0
votes
1answer
174 views
Is expect tool availabe for ARM platform
I need to get expect (tool for automating interactive applications) for the ARM platform. Is it a readily cross compiled to ARM and is it available? I tried googling but was unable to get the ...
2
votes
0answers
242 views
Are there any tools to test MTD/JFFS2 for Linux 2.4 kernels
I have some issues with a platform I support and I suspect memory problems. I wanted to check the Flash parts using some MTD JFFS2 test tools, I found a link to a bunch on this site.
However they ...
2
votes
1answer
607 views
Where does the “export” command come from?
Why doesn't the whereis command give any information about the export command? How does the export command work even if the shell path variable is set to null?
0
votes
3answers
746 views
touch: cannot touch file: No such file or directory
I am getting the error:
touch: cannot touch `/opt/tsrm/compliance/cme/log/20121207.log`: No such file or directory
on the touch command: touch $LOGFILE
I also checked the link: touch: cannot ...
1
vote
1answer
118 views
How to change the current directory graphically using the keyboard only?
There was a program named NCD (Norton Change Directory) a few years ago that did a good job at helping me change directory back in the DOS days.
This programs displayed a tree, and you could navigate ...
2
votes
2answers
215 views
Is there a good FOSS utility for converting machine code to assembly or even C?
If I buy a piece of x86 32-bit or 64-bit software but I don't receive the source code, and I need to modify the software, I'll need to convert the machine code back into a high level language or at ...
1
vote
2answers
863 views
Does hexdump respect the endianness of its system?
On my machine I get the following output when I run these commands:
$ echo foos > myfile
$ hexdump myfile
6f66 736f 000a
The output from hexdump is big-endian. Does this mean that my machine is ...
2
votes
1answer
351 views
I try to add passwords to the “pass” password manager. But my attempts fail with “no public key” GPG errors. Why?
I am trying to install Pass: the standard Unix password manager, however, when I try to add passwords to the appliation I get these errors
gpg: Kelly's Passwords: skipped: No public key
gpg: [stdin]: ...
3
votes
1answer
122 views
Understanding the output of the “who -a” command
I ask this question because, while there are many answers on the internet showing that "who -a" is an option, nobody explains how to read the output. If you can provide a link to an online site that ...
6
votes
4answers
405 views
Can a file that was originally sparse and expanded be made re-sparse
I know that copying or transferring what was originally a sparse file without using a utility that understands sparse files will cause the 'holes' to be filled out. Is there a method or utility to ...
1
vote
2answers
184 views
Clear the screen and show a banner
I need a text banner on a screen which is projected all the time. The screen is connected to a PC with tmux on it.
Example of text "banners":
figlet $(fortune)
or
toilet "$(cowsay $(fortune))"
...
0
votes
1answer
107 views
Change Directory and List Files [duplicate]
Possible Duplicate:
Make cd automatically ls
I think that it would be very useful to have a unix utility that combines 'cd' and 'ls' so that when you change your directory, it automatically ...
26
votes
2answers
4k views
What is the difference between curl and wget?
I am keen to know the difference between curl and wget. Both are used to get files and documents but what the key difference between them... Why are there two different methods?
3
votes
2answers
320 views
Are there any utilities to quickly add, list and remove command aliases?
I'd like to be able to quickly, on-the-fly add (and list/remove) command aliases so that they persist between shell restarts (as if they were added to .bashrc). Are there any ready ...
3
votes
2answers
131 views
Peer to peer~ish LAN storage
I have a distributed application that consists in a main CMS server where "human" users can upload videos, pictures (media content, basically) and a bunch of "players" that play those videos or ...
5
votes
1answer
1k views
Are there alternatives for `dd`?
What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
6
votes
4answers
2k views
cp or rsync, is cp really worth it?
I hope this does not count as a question without a real answer, as I can't seem to find a good reason to use cp(1) over rsync(1) in virtually all circumstances. Should one typically favour rsync over ...
10
votes
5answers
2k views
A standard tool to convert a byte-count into human KiB MiB etc; like du, ls1
Is there a standard tool which converts an integer count of Bytes into a human-readable count of the largest possible unit-size, while keeping the numeric value between 1.00 and 1023.99 ?
I have my ...
4
votes
3answers
354 views
Monitor directory and if a file is requested then rsync on demand
Is there a tool that monitors a certain directory and if a program tries to access a file in that directory, the program loads that file from another place transparent for any application that tries ...
-1
votes
1answer
500 views
Phrase Express Equivalent for Linux?
Is there some sort of auto text-insertion program with macros, similar to PhraseExpress for Windows in Linux?
1
vote
1answer
296 views
How to change the default line length for od and hexdump
Is there any way to change the default line length for the od and hexdump commands? Can't see anything apropriate in the man pages.
0
votes
3answers
120 views
CLI & Markup language
I often find myself editing files for my personal use that are plaintext. Either those are notes, annotations in project directories or sometimes the output of programs that I annotate.
However, ...
2
votes
2answers
394 views
List of available command options?
I'm currently setting up my first web server without a control panel and so far things are going pretty good!
I was just wondering if anyone could direct me to somewhere that explains all of the ...