Most Popular

1500 questions
123
votes
2 answers

What are the systemctl options to "List all failed units"

systemctl Returns a list of the units, whether they are loaded, active, their sub and description. systemctl is-failed Returns a list of status only. What is the syntax to return the details of the failed units?
Tai Paul
  • 1,341
123
votes
7 answers

Error when trying to connect to bluetooth speaker: `org.bluez.Error.Failed`

I'm running Debian Jessie 8.2. I have a bluetooth USB dongle connected to my machine. I run sudo bluetoothctl -a then do the following: [NEW] Controller 5C:F3:70:6B:57:60 debian [default] Agent registered [bluetooth]# scan on Discovery started [CHG]…
Username
  • 819
123
votes
13 answers

Is there any decent speech recognition software for Linux?

The short version of the question: I am looking for a speech recognition software that runs on Linux and has decent accuracy and usability. Any license and price is fine. It should not be restricted to voice commands, as I want to be able to dictate…
123
votes
8 answers

Why is scp so slow and how to make it faster?

I'm trying to copy a batch of files with scp but it is very slow. This is an example with 10 files: $ time scp cap_* user@host:~/dir cap_20151023T113018_704979707.png 100% 413KB 413.2KB/s 00:00 cap_20151023T113019_999990226.png 100% …
laurent
  • 1,998
122
votes
12 answers

How to test what shell I am using in a terminal?

How to check what shell I am using in a terminal? What is the shell I am using in MacOS?
user5837
  • 1,321
122
votes
11 answers

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
ripper234
  • 31,763
122
votes
8 answers

How to install program locally without sudo privileges?

Assume I have ssh access to some Ubuntu server as user and I need some not system tools to be installed for convenience (mc, rtorrent, mcedit). I do not want to bother admins for these small programs. Is there a way to install them (make them run)…
yura
  • 1,367
  • 2
  • 10
  • 8
122
votes
9 answers

Creating a GIF animation from PNG files

Is there a tool to create a gif animation from a set of png files? I tried the convert command from the ImageMagick suite, but this doesn't always succeed. Also, I have several issues with this: I can't tell what the progress is. No matter what I…
Yotam
  • 2,694
  • 6
  • 29
  • 32
122
votes
2 answers

Setting /proc/sys/vm/drop_caches to clear cache

As part of doing some cold cache timings, I'm trying to free the OS cache. The kernel documentation (retrieved January 2019) says: drop_caches Writing to this will cause the kernel to drop clean caches, as well as reclaimable slab objects like…
Faheem Mitha
  • 35,108
122
votes
7 answers

Convert file contents to lower case

I have temp file with some lower-case and upper-case contents. Input Contents of my temp file: hi Jigar GANDHI jiga I want to convert all upper to lower. Command I tried the following command: sed -e "s/[A-Z]/[a-z]/g" temp but got wrong…
JigarGandhi
  • 4,960
122
votes
13 answers

Generate random numbers in specific range

After googling a bit I couldn't find a simple way to use a shell command to generate a random decimal integer number included in a specific range, that is between a minimum and a maximum. I read about /dev/random, /dev/urandom and $RANDOM, but none…
BowPark
  • 4,895
122
votes
3 answers

Why is "echo" so much faster than "touch"?

I'm trying to update the timestamp to the current time on all of the xml files in my directory (recursively). I'm using Mac OSX 10.8.5. On about 300,000 files, the following echo command takes 10 seconds: for file in `find . -name "*.xml"`; do echo…
Casey Patton
121
votes
5 answers

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start something that wants to bind to 8080 and some else is…
user5721
121
votes
10 answers

Can't indent heredoc to match code block's indentation

If there's a "First World Problems" for scripting, this would be it. I have the following code in a script I'm updating: if [ $diffLines -eq 1 ]; then dateLastChanged=$(stat --format '%y' /.bbdata | awk '{print $1" "$2}' | sed…
Bratchley
  • 16,824
  • 14
  • 67
  • 103
121
votes
10 answers

Vi vs vim, or, is there any reason why I would ever want to use vi?

I know a bit about *NIX text editors (currently migrating from nano to vim), and, after looking around a bit on the Unix & Linux SE, have noticed that vi is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi…
fouric
  • 2,281