Most Popular

1500 questions
136
votes
4 answers

Throttle the download speed of wget or curl while downloading

Is it possible to throttle (limit) the download speed of wget or curl ? Is it possible to change the throttle value while it is downloading ?
Gautam
  • 2,295
  • 5
  • 18
  • 18
136
votes
1 answer

Why eval the output of ssh-agent?

In order to run ssh-agent I have to use: eval $(ssh-agent) Why is it necessary to eval the output of ssh-agent? Why can't I just run it?
jx12345
  • 1,570
  • 2
  • 10
  • 12
136
votes
7 answers

journalctl: how to prevent text from truncating in terminal

How can I keep long strings from truncating in terminal? For example if I run journalctl -xn There's a lot of text that I cannot read. I am open to using other programs/tools.
P.Brian.Mackey
  • 1,691
  • 3
  • 15
  • 20
136
votes
23 answers

Is there a way to get the min, max, median, and average of a list of numbers in a single command?

I have a list of numbers in a file, one per line. How can I get the minimum, maximum, median and average values? I want to use the results in a bash script. Although my immediate situation is for integers, a solution for floating-point numbers…
Peter.O
  • 32,426
  • 28
  • 115
  • 163
136
votes
8 answers

Long line wrapping in Nano

When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys So, I hit Esc + L which is the meta key…
codecowboy
  • 3,362
  • 7
  • 23
  • 29
135
votes
17 answers

Easy way to determine the virtualization technology of a Linux machine?

I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ). This isn't a hostile environment: I'm not…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
135
votes
4 answers

What's the difference between $@ and $*

According to this page, $@ and $* do pretty much the same thing: The $@ holds list of all arguments passed to the script. The $* holds list of all arguments passed to the script. After searching all the top hits in google, I'm not able to find…
spuder
  • 17,643
  • 36
  • 91
  • 119
135
votes
12 answers

List packages on an apt based system by installation date

How can I list installed packages by installation date? I need to do this on debian/ubuntu. Answers for other distributions would be nice as well. I installed a lot of stuff to compile a certain piece of code, and I want to get a list of the…
Elazar Leibovich
  • 3,131
  • 5
  • 27
  • 28
135
votes
4 answers

How to insert text after a certain string in a file?

Right now I'm using echo "Hello World" >> file.txt to append some text to a file but I also need to add text below a certain string let's say [option], is it possible with sed? EG: Input file Some text Random [option] Some stuff Output file Some…
Javier Villanueva
  • 1,657
  • 2
  • 16
  • 16
134
votes
8 answers

How do I kill all screens?

I accidentally created over 1000 screens. How do I kill them all with one command? (Or a few)
BrainStone
  • 3,534
  • 12
  • 32
  • 53
134
votes
10 answers

How to determine CentOS version?

How do I determine the version of a CentOS server without access to any graphical interface? I've tried several commands: # cat /proc/version Linux version 2.6.18-128.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat…
Philippe Blayo
  • 1,949
  • 4
  • 18
  • 23
134
votes
4 answers

What is the difference between ~/.profile and ~/.bash_profile?

What is the difference between ~/.profile and ~/.bash_profile?
lakshmen
  • 6,071
  • 5
  • 17
  • 9
134
votes
10 answers

How to unzip a multipart (spanned) ZIP on Linux?

I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux. I created a test in its own folder, zipping up a PDF into test.zip.001, .002, and .003. How…
Tim
  • 1,443
  • 2
  • 10
  • 5
134
votes
6 answers

Sorting the output of "find -print0" by piping to the "sort" command

I need to be able to alphabetically sort the output of find before piping it to a command. Entering | sort | between didn't work, so what could I do? find folder1 folder2 -name "*.txt" -print0 | xargs -0 myCommand
Industrial
  • 1,771
  • 4
  • 13
  • 12
134
votes
4 answers

Unlimited history in zsh

In zsh, I want to have unlimited history. I set HISTSIZE=, which works in bash. Now I import an old history mv old_history .history which is pretty big wc -l .history 43562 .history If I now close and start zsh again, I see wc -l .history 32234…
pfnuesel
  • 5,702
  • 8
  • 35
  • 60