Most Popular
1500 questions
196
votes
5 answers
Understanding of diff output
I have file1.txt
this is the original text
line2
line3
line4
happy hacking !
and file2.txt
this is the original text
line2
line4
happy hacking !
GNU is not UNIX
if I do: diff file1.txt file2.txt I get:
3d2
< line3
5a5
>…
Jim
- 9,750
- 15
- 57
- 84
196
votes
3 answers
What's the difference between a normal user and a system user?
Some documentation I'm going through has a boolean switch on whether or not a user is a 'system' user or a 'normal' user (defaulting to 'normal').
What is the difference between these two modes of user-ship? I don't need to learn what a user is or…
Sean Allred
- 2,429
- 3
- 17
- 20
196
votes
6 answers
What are the pros/cons of Upstart and systemd?
It appears systemd is the hot new init system on the block, same as Upstart was a few years ago. What are the pros/cons for each? Also, how does each compare to other init systems?
tshepang
- 64,472
- 86
- 223
- 290
196
votes
5 answers
grep returns "Binary file (standard input) matches" when trying to find a string pattern in file
I'm on Ubuntu and I typed cat .bash_history | grep git and it returned
Binary file (standard input) matches
My bash_history does exist and there are many lines in it that starts with git.
What caused it to display this error and how can I fix it?
answerSeeker
- 2,297
- 3
- 14
- 16
194
votes
4 answers
Is your SSH password revealed when you attempt to connect to the wrong server?
When you accidentally attempt to connect to the wrong server with password credentials is it possible for the administrator to read and log the password you used?
vfclists
- 7,215
- 14
- 51
- 79
194
votes
3 answers
In Arch Linux how can I find out which package to install that will contain file X?
I'm looking for a package that provides a specific binary, so I can install it. how can I search to find out what packages provide this binary? (note: I know there's at least one tool that does this, but I have forgotten its name.)
xenoterracide
- 57,918
- 74
- 184
- 250
193
votes
5 answers
Is there any way to execute commands from history?
For example:
[root@ip-10-0-7-125 ~]# history | grep free
594 free -m
634 free -m | xargs | awk '{print "free/total memory" $17 " / " $ 8}'
635 free -m
636 free -m | xargs | awk '{print "free/total memory" $9 " / " $ 10}'
736 df -h |…
The One
- 4,662
- 11
- 29
- 35
193
votes
7 answers
Creating diagrams in ASCII
I am looking for a program which I can use to create ASCII diagrams such these:
+---------+
| | +--------------+
| NFS |--+ | |
| | | +-->| …
Martin Vegter
- 69
- 66
- 195
- 326
193
votes
6 answers
Generate File of a certain size?
I'd like to generate a file with the name example.file. I could use
touch example.file
but I want the file to be exactly 24MB in size. I already checked the manpage of touch, but there is no parameter like this. Is there an easy way to generate…
R_User
- 2,033
- 2
- 12
- 5
192
votes
5 answers
How do I add X days to date and get new date?
I have Linux ( RH 5.3) machine
I need to add/calculate 10 days plus date so then I will get new date (expiration date))
for example
# date
Sun Sep 11 07:59:16 IST 2012
So I need to get
NEW_expration_DATE = Sun Sep 21 07:59:16 IST…
yael
192
votes
3 answers
How to list disks, partitions and filesystems in Linux?
In Windows, if you type LIST DISK using DiskPart in a command prompt it lists all physical storage devices, plus their size, format, etc. What is the equivalent of this in Linux?
Mia
- 1,931
- 2
- 11
- 4
192
votes
7 answers
Temporarily suspend bash_history on a given shell?
Is there a way to temporarily suspend history tracking in bash, so as to enter a sort of "incognito" mode? I'm entering stuff into my terminal that I don't want recorded, sensitive financial info.
Naftuli Kay
- 38,686
- 85
- 220
- 311
191
votes
4 answers
How to combine 2 -name conditions in find?
I would like to search for files that would not match 2 -name conditions. I can do it like so :
find /media/d/ -type f -size +50M ! -name "*deb" ! -name "*vmdk"
and this will yield proper result but can I join these 2 condition with OR somehow ?
Patryk
- 13,556
- 22
- 53
- 61
191
votes
11 answers
Is there a way to dynamically refresh the less command?
I like the watch command, but it has its limitations.
I'm curious to know whether I could mimic the functionality of watch with less. I'm mainly looking for the ability to scroll through my directory as it dynamically gets modified via a running…
Zaid
- 10,442
- 13
- 38
- 36
191
votes
9 answers
How can I disown a running process and associate it to a new screen shell?
I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back.
One way I thought of doing that was to transfer its ownership to a screen shell, thus keeping it running in there.
Is there a…
levesque
- 3,775
- 5
- 20
- 15