Most Popular
1500 questions
120
votes
12 answers
How to rename terminal tab title in gnome-terminal?
Used to be able to right click on the tab and change the title. Not sure how to do this anymore. Just upgraded to Fedora 21.
EDIT: I have switched from gnome-terminal to ROXterm

penner
- 1,311
120
votes
6 answers
How to integrate mv command after find command?
I am searching for files which name which contain AAA within their path using following command:
find path_A -name "*AAA*"
Given the output showed by the above command, I want to move those files into another path, say path_B. Instead of moving…

huahsin68
- 1,917
120
votes
7 answers
Linux: set date through command line
How to change the system date in Linux ?
I want to change:
Only Year
Only Month
Only Date
Any combination of above three

SHW
- 14,786
- 14
- 66
- 101
120
votes
6 answers
Replace multiple spaces with one using 'tr' only
I have a file, f1.txt:
ID Name
1 a
2 b
3 g
6 f
The number of spaces is not fixed. What is the best way to replace all the white spaces with one space using only tr?
This is what I have so far:
cat f1.txt | tr -d "…

gkmohit
- 3,309
120
votes
6 answers
is my linux ARM 32 or 64 bit?
under an intel I know I can look at the outcome of uname -m to know if my OS is 32 or 64 bit, but under ARM this gives:
armv7l
I deduced from
file /usr/bin/ls
that I'm on a 32-bit OS, but how can I know this in an easier way?

Chris Maes
- 3,392
120
votes
13 answers
ssh_exchange_identification: Connection closed by remote host (not using hosts.deny)
I'm not using hosts.allow or hosts.deny, furthermore SSH works from my windows-machine (same laptop, different hard drive) but not my Linux machine.
ssh -vvv root@host -p port gives:
OpenSSH_6.6, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading…

Torxed
- 3,637
120
votes
5 answers
Kill all descendant processes
I'm writing an application. It has the ability to spawn various external processes. When the application closes, I want any processes it has spawned to be killed.
Sounds easy enough, right? Look up my PID, and recursively walk the process tree,…

MathematicalOrchid
- 5,934
120
votes
5 answers
Does tail read the whole file?
If I want to tail a 25 GB textfile, does the tail command read the whole file?
Since a file might be scattered on a disk I imagine it has to, but I do not understand such internals well.

The Unfun Cat
- 3,391
119
votes
7 answers
Flattening a nested directory
This is probably very simple, but I can't figure it out. I have a directory structure like this (dir2 is inside dir1):
/dir1
/dir2
|
--- file1
|
--- file2
What is the best way to 'flatten' this directory structure…

turtle
- 2,697
- 5
- 20
- 17
119
votes
4 answers
How to print only the duplicate values from a text file?
Suppose there is a column of numeric values like following:
File1:
1
2
3
3
3
4
4
4
5
6
I want the output:
3
4
That is, only the repeated lines. Are there any command line tools to find this out in Linux? (NB: The values are numerically sorted).

N. F.
- 2,209
119
votes
7 answers
What are high memory and low memory on Linux?
I'm interested in the difference between Highmem and Lowmem:
Why is there such a differentiation?
What do we gain by doing so?
What features does each have?

Navaneeth Sen
- 9,489
119
votes
7 answers
How to pass the output of one command as the command-line argument to another?
So I have a script that, when I give it two addresses, will search two HTML links:
echo "http://maps.google.be/maps?saddr\=$1\&daddr\=$2" | sed 's/ /%/g'
I want to send this to wget and then save the output in a file called temp.html. I tried this,…
Matt D
119
votes
13 answers
Kill all background jobs
Is there a more compact form of killing background jobs than:
for i in {1..5}; do kill %$i; done
Also, {1..5} obviously has a hard-coded magic number in it, how can I make it "N" with N being the right number, without doing a:
$(jobs | wc -l)
I…

Robottinosino
- 5,321
119
votes
14 answers
How to understand what's taking up disk space?
I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives.
A program that works on console and doesn't require a UI is preferred .

ripper234
- 31,763
119
votes
11 answers
Why does argv include the program name?
Typical Unix/Linux programs accept the command line inputs as an argument count (int argc) and an argument vector (char *argv[]). The first element of argv is the program name - followed by the actual arguments.
Why is the program name passed to…

Shrikant Giridhar
- 1,287