Tagged Questions

small programs used on the command line to do a specific job

learn more… | top users | synonyms (1)

4
votes
1answer
94 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
374 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 ...
1
vote
1answer
320 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
255 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 ...
3
votes
0answers
483 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
1k 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?
1
vote
3answers
3k 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
131 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
267 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 ...
3
votes
2answers
2k 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 little-endian. Does this mean that my machine ...
2
votes
1answer
1k 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
184 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 ...
9
votes
4answers
975 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
229 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
141 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 ...
39
votes
3answers
10k 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 programs?
3
votes
2answers
398 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
167 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
2k 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 ...
7
votes
4answers
4k 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 ...
20
votes
6answers
5k 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
550 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 ...
0
votes
2answers
774 views

Phrase Express Equivalent for Linux?

Is there some sort of auto text-insertion program with macros, similar to PhraseExpress for Windows in Linux? In case you've never seen this application it offers the following features: Organize ...
1
vote
1answer
537 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
128 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
1k 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 ...
1
vote
3answers
191 views

line count on all the PHP scripts within my webroot with wc

How can I do a line count on all the PHP scripts within my webroot? I am trying something like this below to no avail: wc -l *.php
8
votes
2answers
1k views

Alternative to watch which support colors

I have a command (phpunit) which has a colored output. According to the watch, command I should be able to use the --color flag to allow color rendering to pass through. However, this isn't working. ...
2
votes
4answers
257 views

xsel < /tmp/xselection not working in script

I'm trying to use the following script: #!/usr/bin/env bash # Edit xselection in gvim xsel > /tmp/xselection gvim /tmp/xselection xsel < /tmp/xselection But the final line does not seem to be ...
4
votes
3answers
986 views

Why doesn't uname -a return a useful identifier

I typed the command uname -a into my college's server and got this: 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:14:03 EDT 2011 i686 i686 i386 GNU/Linux Are they trying to hide the version of Linux that ...
11
votes
3answers
3k views

Fix or alternative for mktemp in OS X

I'm looking at a bash script someone else wrote that uses mktemp: TEMP=`mktemp --directory` However, this line does not work on my machine (OS X 10.6). How would I fix this line so that it is ...
21
votes
4answers
866 views

Are Linux utilities smart when running piped commands?

I was just running a few commands in a terminal and I started wondering, does Unix/Linux take shortcuts when running piped commands? For example, let's say I have a file with one million lines, the ...
6
votes
1answer
331 views

Interactive tree command

Is there any version of tree command that displays file structure as a tree structure, but in a way that I can interactively walk trough? Why do I need it exactly - I am trying to simulate TextMate ...
3
votes
2answers
3k views

file block size - difference between stat and ls

I've noticed that when I do a: ls -ls file It provides block count, say 8 blocks. When I do: stat file I notice that the block count is 16, twice the number given by ls. The block size on my ...
12
votes
2answers
260 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
1k views

Listing a hardrive partition by blocks using LBA

Most hard drive and partition inspection tools seem to list the items using sectors, head.. etc. From another question I was told that these are virtual because they have to be converted from lba, ...
2
votes
1answer
657 views

How to plot the output of a command

How can I plot the output of this command line with GNUPlot? What should the diagram script look like? I want a histogram. wget -O - -o /dev/null http://www.stackoverflow.com/ | cat | cat | sed ...
4
votes
2answers
2k views

Set alignment of numeric columns when columnating data

I use column -t to format data for easy viewing in the shell, but there seems to be no option to specify column alignment (e.g. align to the right). Any Bash one-liners to do it? I have arbitrary ...
3
votes
2answers
91 views

Output the changes to a log file

If I use tail -f *filename* I get a real nice display of whatever is changing in a given file. However, sometimes I want to be able to search this text or otherwise look it over slowly. Is ...
20
votes
5answers
29k views

How can I use sed to replace a multi-line string?

I've noticed that, if I add \n to a patter for a substitute using sed, it does not match. Example: $ cat > alpha.txt This is a test Please do not be alarmed $ sed -i'.original' 's/a test\nPlease ...
7
votes
4answers
5k views

creating a sequence of numbers, one per line in a file

Is there a way to create out of thin air, a file that is a sequence of numbers, starting at a given number, one per line? something like magic_command start 100 lines 5 > b.txt and then, b.txt ...
3
votes
1answer
970 views

installing column unix utility on windows

I would like to be able to use the BSD unix utilities: column, join and paste in my Cygwin installation. It seems that they are not available, or I cannot find them. Is there a way to install them so ...
2
votes
1answer
1k views

How synchronize two disks (or folders) using symbolic (or hard) links (like rsync)?

I'm searching a tool or a shell script or another program to synchronize two or more folders or disks. But it differs of rsync tool, because, I don't want to duplicate the missing file, but do a ...
2
votes
1answer
80 views

How to use the -t option of Unix command look

I'm learning the look utility and I don't understand the meaning of the -t option. Can someone show me some examples of it? I read the man page, but still don't know what it exactly means.
3
votes
2answers
6k views

Why is 'df' hanging?

I have recently been having problems running df, where it just hangs. Here's strace output, and in it, you'll see that I killed since it was just sitting there: $ strace /bin/df execve("/bin/df", ...
3
votes
2answers
102 views

Unatended script execution in ubuntu terminal

I have installed Ubuntu on a VMWare virtual machine. When I got to installing a VMWare tools, I have stumbled upon a simple question: If I execute a script (perl script in VMWare tools case), is ...
6
votes
2answers
536 views

What commands have -h human readable option, and how can I enable it by default w/env variable?

I'm tired of using aliases or typing -h. I want human readable output 24/7. Is there a way to enable it all the time for all commands that offer it?
5
votes
1answer
138 views

How would one detect if external command exists in a script?

Is there a way to detect if an external command exists (i.e. wget, svn)? More specifically today, i was trying to run one of my scripts i wrote and the person didn't have wget or svn installed. The ...
0
votes
0answers
29 views

Problem with calling program from the command line [closed]

Note: this is a cross post with this post on SO. I am trying to build a command line wrapper in Python 3 for an exiting command line tool called 'spooky' and I am having a hard time understanding ...
0
votes
1answer
225 views

Listing only the files in a folder and inside its subfolders

Is there a linux command for getting only the files in a folder and inside its subfolders? I have used the find command, but it is displaying all the files and folders. I am executing this shell ...