Questions tagged [linux]

A family of Unix-like operating systems using the Linux kernel. If your question is about a certain distribution only, use a more specific tag.

Filter by
Sorted by
Tagged with
59 votes
5 answers
79k views

How to run a command after an already running, existing one finishes?

If I start a script that is going to take a long time, I inevitably realize it after I've started the script, and wish I had a way of doing some kind of alert once it finishes. So, for example, if I ...
mlissner's user avatar
  • 1,212
59 votes
13 answers
167k views

How to resume CUPS printer from command line?

I have printer in CUPS that due to driver problems (HP 1010) from time to time goes into pause. I would like to write a shell script that will execute once per hour to resume a printer in CUPS. But ...
Stani's user avatar
  • 721
59 votes
11 answers
180k views

Killing all instances of Chrome on the command-line?

In some cases killing a single tab/process doesn't do it and I need to close Chrome entirely. Since Chrome has multiple processes, how can I close all of them at once? I know that... pgrep chrome ...
meder omuraliev's user avatar
59 votes
17 answers
126k views

Using cd to go up multiple directory levels

I'm dealing with java projects which often result in deeply nested folders (/path/to/project/com/java/lang/whatever, etc) and sometimes want to be able to jump, say, 4 directory levels upwards. Typing ...
Tossrock's user avatar
  • 591
59 votes
3 answers
71k views

Linux - some way to keep a live-updating log file open in terminal?

This must've been done before: I want to keep a log file open in terminal so I can monitor updates to it as they occur. My searches are coming up with everything but this situation... I must be ...
wulftone's user avatar
  • 963
59 votes
4 answers
29k views

Can't rename a file the name of which starts with a hyphen

I'm trying to rename a file with a hyphen at the beginning of its name and both this: mv -example-file-name example-file-name and this: mv '-example-file-name' example-file-name result in: mv: ...
Desmond Hume's user avatar
  • 2,590
59 votes
3 answers
138k views

What is the equivalent of the Linux command "sudo fdisk -l" in MacOS?

In Linux, the command sudo fdisk -l produces an output that lists all the disks and partitions in the computer. Here is an example: If I try to use sudo fdisk -l in MacOS X 10.7.5, the output is the ...
Vito Gentile's user avatar
59 votes
3 answers
45k views

Is there a way to find out what application using most of bandwidth in Linux? [closed]

I'm looking for an utility that could show me how much of a bandwidth each process are using. It should just print the data and exit as I want to feed that list into conky.
vava's user avatar
  • 5,878
59 votes
6 answers
88k views

How to stream my GNU/Linux audio output to Android devices over WI-FI?

I want to stream my audio output over the network (Wi-Fi) to my Android devices. I'm not looking for a music/video streaming solution, but I would stream any audio output of my GNU/Linux desktop to my ...
semente's user avatar
  • 590
59 votes
2 answers
29k views

GNU sort by case-sensitive

The sort utility in Ubuntu 10.04 (Lucid) always sort by case-insensitive, just like if you specify --ignore-case to it. The two sort just give the same result: echo -e "c\nb\nB\na" | sort echo -e "...
Lenik's user avatar
  • 18.3k
58 votes
4 answers
7k views

Is a file system just the layout of folders?

I have used Windows since childhood, and when I hear the phrase "Windows filesystem" I think of directories (folders) within directories, a folder called SYSTEM, a folder called PROGRAM FILES etc. Is ...
P_Q's user avatar
  • 1,125
58 votes
2 answers
20k views

what is the difference between "command && command" and "command ; command"

I see these two usage on Ubuntu "command && command" and "command ; command", e.g. apt-get update && apt-get upgrade What would differ if I use apt-get update; apt-get upgrade? I ...
user avatar
58 votes
5 answers
28k views

Linux equivalent command for "open" command on Mac/Windows?

Coming from Mac OS X, you can type: $ open yourfilehere.txt and your file will open just as if you had opened it from Finder. On Windows, one can type: > start yourfilehere.txt and it will ...
jweede's user avatar
  • 6,863
58 votes
5 answers
106k views

How do you check how much power a USB port can deliver?

Some laptops have a special USB port that can deliver more power than the other ones. However it is not always easy to identify which one is the good one, nor how much power it can deliver. So is ...
Peltier's user avatar
  • 6,294
58 votes
6 answers
27k views

Two keyboards on one computer. When I write with A I want a US keyboard layout, when I use B I want Swedish. Possible?

I have a laptop which I use an external keyboard with. When I type using the external keyboard I want to use a US keyboard layout, since that's the type of external keyboard I have. On the other hand, ...
Deleted's user avatar
  • 5,108
58 votes
9 answers
40k views

Alternative to the tee command without STDOUT

I'm using | sudo tee FILENAME to be able to write or append to a file for which superuser permissions are required quite often. Although I understand why it is helpful in some situation, that tee ...
aef's user avatar
  • 1,452
58 votes
3 answers
24k views

How urgent is a *** System restart required *** for security?

To learn a bit of server administration I've set up a simple Ubuntu 14.04 server on which I run a personal website. I've set it to automatically install security updates, but leave out the other ...
kramer65's user avatar
  • 1,424
57 votes
4 answers
16k views

What is the purpose of cd ` (backtick)?

The following behaves the same in Fedora and CentOS. cd mydirectory works. cd notadirectory works (gets an error from Bash). However, cd ` gives me some sort of prompt: > Nothing I've ...
Mooseman's user avatar
  • 1,490
57 votes
8 answers
10k views

How do I check if a 2-track WAV file is "really" in stereo?

I have an audio file (WAV format to be specific). When I open it with an editor (e.g. audacity), I see two channels I suspect that the recording is actually mono rather than audio, i.e. I suspect the ...
einpoklum's user avatar
  • 9,423
57 votes
3 answers
43k views

Can a process be frozen temporarily in linux?

I was wondering if there is a way to freeze any process for a certain amount of time? What I mean is that: is it possible for one application (probably running as root) to pause the execution of ...
Pal Szasz's user avatar
  • 673
57 votes
4 answers
73k views

How do I find out what processes are accessing the hard disk in a GNU/Linux-based system?

I'm looking for the equivalent to top for disk access, so I can tell which process(es) are currently reading and/or writing to disk. I'm currently using Ubuntu, but I imagine there's a standard tool ...
Olivier Dagenais's user avatar
57 votes
5 answers
45k views

Why must a folder be executable?

Permission for files: chmod 664 myFile // rw-rw-r-- And for folders: chmod 774 myFolder // rwxrwxr-- If I only use the "read and write" permission, the folders won't show their contents. What's ...
Caio's user avatar
  • 927
57 votes
6 answers
15k views

Equivalent/Alternatives for Alt+Dot in Mac

One thing i miss from the Linux shell is the Alt+Dot shortcut. What it does is insert the last argument of the previous command. It appears to be a trivial technique, but it's really useful. i.e. if ...
pablasso's user avatar
  • 749
57 votes
3 answers
58k views

"Private key is missing or invalid when importing a certificate" in Google Chrome

I want to test my web app on https localhost. Unfortunately it seems impossible to remove certificate warning from chrome. First, I generated the certificate like this: openssl req -x509 -nodes -days ...
Maciej Kravchyk's user avatar
57 votes
11 answers
221k views

Is there a log that records shutdowns in Linux?

I was wondering if there is a log file in Linux which records every time the computer is shut down? The reason I am asking is I am doing some tests involving how long my laptop battery lasts under ...
Michael's user avatar
  • 1,261
57 votes
8 answers
69k views

Screensharing under Wayland

I am using Wayland with Fedora 25. Pretty much no screensharing tool works correctly. From Chrome, I can share a Chrome window, but nothing else. I also have to use zoom.us and when I share a window ...
Derek Ekins's user avatar
57 votes
2 answers
62k views

Difference between /etc/crontab and "crontab -e"

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
jrdioko's user avatar
  • 12.8k
57 votes
5 answers
218k views

How to tar directory and then remove originals including the directory?

I'm trying to tar a collection of files in a directory called 'my_directory' and remove the originals by using the command: tar -cvf files.tar my_directory --remove-files However it is only removing ...
Nicholas's user avatar
  • 1,123
57 votes
8 answers
63k views

How to do Rsync-like encrypted backup?

I want to save a backup of my data on a remote server, but never want the backup server to see the data unencrypted. Editing a single file and backing up should not result in everything being ...
user avatar
56 votes
8 answers
141k views

How to list folders using bash commands?

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
SpiXel's user avatar
  • 969
56 votes
2 answers
180k views

how to get elements from list in bash?

Here is a LIST: List = "abcd 1234 jvm something" How to get the second element "1234" without looping all the list?
SpawnST's user avatar
  • 2,371
56 votes
10 answers
124k views

Command line SVG and image file viewer in Linux?

Is there any command line (pipeable) graph viewer for SVG, JPG, and PNG images? I'm particularly looking for a way to pipe the graphs/images to the program, instead of using files, so there must be an ...
Lenik's user avatar
  • 18.3k
56 votes
5 answers
54k views

Rsync files via intermediate host

I am currently away from my LAN and I need to do a backup of my laptop. I have a somewhat recent copy of my laptop on my server and I usually back the laptop up using rsync. Now I wish to do that, but ...
GLaDER's user avatar
  • 811
56 votes
4 answers
154k views

How do I recursively download a directory using smbclient?

When I try to fetch a directory with get "Path To\Directory\", I get the following error: NT_STATUS_FILE_IS_A_DIRECTORY opening remote file Path To\Directory How do I recursively download this ...
hololeap's user avatar
  • 1,421
56 votes
2 answers
11k views

Why is my Linux system repeating every command that I type?

I'm using a Ubuntu Linux system, and every command I enter is displayed on the next line, followed by the output of the command. For example: root@dpkube165:~# ls ls <--- why is this here? ...
Chad's user avatar
  • 1,609
56 votes
1 answer
90k views

How to create multipart 7zip file in Linux?

How can I create a multipart 7zip file in Linux using the p7zip console client? Many people referred me to it. My console app is 7-Zip [64] 9.13 beta Copyright (c) 1999-2010 Igor Pavlov 2010-04-...
hopeseekr's user avatar
  • 1,672
56 votes
3 answers
92k views

How can I logout an open, remote SSH session?

I sshed into a Linux machine (bash shell) from a public Windows machine (in our lab) and forgot to log out. I'm now back at my seat in another room and I am too lazy to walk back and log out that ...
Amarghosh's user avatar
  • 703
56 votes
6 answers
194k views

fsck an ntfs drive in Linux

Is there a way to fsck/chkdsk an NTFS drive from Linux?
vivin's user avatar
  • 1,453
56 votes
1 answer
17k views

What do those +/- mean if linux job in background finishes (started with &)

If I start a process with an ampersand (&) at the end, it'll be forked to background. When it finishes, I get an output similar to [1]+ Fertig my_script I have a localized distribution, but ...
Phil's user avatar
  • 661
56 votes
4 answers
182k views

How to ping when behind a proxy?

I am using an HTTP proxy server to connect to the internet. Because of that my pings are not working ping www.google.com says Unreachable Host How can I configure ping to use the HTTP proxy?
Lazer's user avatar
  • 17.7k
56 votes
2 answers
34k views

What is the difference between set, env, declare and export when setting a variable in a Linux shell?

What is the difference between set, env, declare and export when setting a variable in a Linux shell, such as bash?
user3872279's user avatar
  • 1,115
55 votes
5 answers
107k views

How can I do a HTTP PUT with Wget?

I am trying to use Wget to access a RESTful interface, but I can not figure out how to do HTTP PUT with Wget. How can I do it? Or isn't it prossible?
Jonas's user avatar
  • 27.5k
55 votes
13 answers
74k views

Getting date and time of system startup in Linux

I know that uptime prints the time a machine has been up and running, but is there an easier (reliable) way to get the date of the start up than counting down from this output? I tried looking around ...
jho's user avatar
  • 978
55 votes
2 answers
424k views

need iptables rule to accept all incoming traffic

For my test environment i want to accept all incoming traffic, can someone please give me the iptable rule to be added. My current iptables -L -n output looks like this Chain INPUT (policy ACCEPT) ...
user avatar
55 votes
5 answers
74k views

I want to change DPI with ImageMagick without changing the actual byte-size of the image data

In GIMP there is a very simple way to do what I want. I only have the German dialog installed but I’ll try to translate it. I’m talking about going to Picture -> PrintingSize and then adjusting the ...
Boris Däppen's user avatar
55 votes
5 answers
59k views

Resume rsync over SSH after broken connection?

I have to transfer large amounts of data (>80 GB) over ssh using rsync. Everything is working fine, but the DSL connection where the backup data is sent from will drop once every 24h for up to 3 ...
user avatar
55 votes
10 answers
42k views

Disable WLan if Wired/Cable Network is available

The question says it all. All i want is that my W-Lan connection should be disabled whenever a wired connection is available. What would be the easiest way to do that in Ubuntu/Gnome? In all guides (...
Wolkenarchitekt's user avatar
55 votes
7 answers
185k views

Run part of a bash script as a different user

I am in Ubuntu 9.04. Is there a way to make part of a script run as a different (non-root) user? If it helps, the part to be run as a different user occurs at the end of the script.
Manish Mathai's user avatar
55 votes
2 answers
69k views

How do I properly set wget to download only new files?

Let's say there's an url, let's call it http://www.some-url.com/folder/ This location has directory listing enabled, therefore I can do this: wget -r -np http://www.some-url.com/folder/ To download ...
Frantisek's user avatar
  • 1,926
55 votes
3 answers
63k views

rsync - does it create a temp file during transfer?

As far as I can see rsync doesn't create the file in the target directory until it is complete. This must mean that it creates the file in a temp directory somewhere and copies the file into the ...
Cheetah's user avatar
  • 1,253

1
7 8
9
10 11
1177