Most Popular
1500 questions
154
votes
6 answers
Where is bash's history stored?
If I run history, I can see my latest executed commands.
But if I do tail -f $HISTFILE or tail -f ~/.bash_history, they do not get listed.
Does the file get locked, is there a temporary location or something similar?

Adionditsak
- 3,935
154
votes
5 answers
chroot "jail" - what is it and how do I use it?
I have heard/read a lot about the chroot jail under linux but have never yet used it (I use Fedora day-to-day), so what is a chroot "jail"? When and why might I use it/not use it and is there anything else I should know? How would I go about…
user119
153
votes
4 answers
How do I find on which physical device a folder is located?
Specifically: I did sudo mkdir /work, and would like to verify it indeed sits on my harddrive and not mapped to some other drive.
How do I check where this folder is physically located?

ripper234
- 31,763
151
votes
2 answers
How to show the filesystem type via the terminal?
Possible Duplicate:
How to tell what type of filesystem you’re on?
Find filesystem of an unmounted partition from a script
How can I quickly check the filesystem of the partition? Can I do that by using df?

tux_drummer
- 1,853
151
votes
1 answer
Understanding the -exec option of `find`
I find myself constantly looking up the syntax of
find . -name "FILENAME" -exec rm {} \;
mainly because I don't see how exactly the -exec part works. What is the meaning of the braces, the backslash and the semicolon? Are there other use cases for…

Zsolt Szilagy
- 1,637
151
votes
5 answers
Understanding the exclamation mark (!) in bash
I used
history | less
to get the lines of previous commands and from the numbers on the left hand side I found the line I wanted repeated (eg. 22) and did
!22
at the command prompt and it worked -- executing the set of commands on the line I did…

Vass
- 5,371
151
votes
6 answers
How does Linux handle multiple consecutive path separators (/home////username///file)?
I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/ in the path. I know that bash doesn't care…

Falmarri
- 13,047
151
votes
10 answers
Username is not in the sudoers file. This incident will be reported
I am running Ubuntu 12.04 on my laptop using VMware Player. I am not sure why but I have an account called "User Account" in addition to my account that I usually login to use Ubuntu. Well that was just a side comment but basically all I am trying…

fsolano94
- 1,647
151
votes
6 answers
Usage of dash (-) in place of a filename
For a command, if using - as an argument in place of a file name will mean STDIN or STDOUT.
But in this example, it creates a file with the name -:
echo hello > -
How can I make - in this example mean STDOUT?
Conversely, how can I make - mean a…

Tim
- 101,790
151
votes
3 answers
Have backticks (i.e. `cmd`) in *sh shells been deprecated?
I've seen this comment many times on Unix & Linux as well as on other sites that use the phrasing "backticks have been deprecated", with respect to shells such as Bash & Zsh.
Is this statement true or false?

slm
- 369,824
150
votes
5 answers
What is yum equivalent of 'apt-get update'?
Debian's apt-get update fetches and updates the package index. Because I'm used to this way of doing things, I was surprised to find that yum update does all that and upgrades the system. This made me curious of how to update the package index…

tshepang
- 65,642
150
votes
7 answers
Error using SCP: "not a regular file"
I have been searching for a while and I can't find the definition of a regular file. My path is permanent (I start at /) and I am connecting to
scp root@IP: /path/to/picture.jpg
Results in an inquiry for a password and then...
scp: .: not a regular…

JeffM
- 1,602
- 2
- 10
- 7
150
votes
3 answers
Recursive glob?
I'd like to write something like this:
$ ls **.py
in order to get all .py filenames, recursively walking a directory hierarchy.
Even if there are .py files to find, the shell (bash) gives this output:
ls: cannot access **.py: No such file or…

Paolo
- 17,355
150
votes
5 answers
How to escape quotes in the bash shell?
I'm having trouble with escaping characters in bash. I'd like to escape single and double quotes while running a command under a different user. For the purposes of this question let's say I want to echo the following on the screen:
'single quote…

m33lky
- 2,585
150
votes
16 answers
Where should I put software I compile myself?
I need to compile some software on my Fedora machine. Where's the best place to put it so not to interfere with the packaged software?

theotherreceive
- 2,086
- 2
- 16
- 9