Most Popular
1500 questions
153
votes
11 answers
How can I find out which users are in a group within Linux?
I've recently been creating new users and assigning them to certain groups. I was wondering if there is a command that shows all the users assigned to a certain group?
I have tried using the 'groups' command however whenever I use this it says…
Jess Louise
- 1,651
- 2
- 11
- 6
153
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,905
- 7
- 21
- 23
153
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
152
votes
14 answers
rm -rf all files and all hidden files without . & .. error
rm -rf /some/path/* deletes all non-hidden files in that dir (and subdirs).
rm -rf /some/path/.* deletes all hidden files in that dir (but not subdirs) and also gives the following error/warning:
rm: cannot remove directory: `/some/dir/.'
rm: cannot…
Jake Wilson
- 1,623
- 2
- 11
- 6
152
votes
2 answers
What is this folder /run/user/1000?
What is this folder: /run/user/1000 on my Fedora system and what does it do?
~ $ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.2G 20K 1.2G 1% /run/user/1000
EDIT: 7 june 2019.
My two answers don't agree on what…
somethingSomething
- 5,721
- 18
- 58
- 98
151
votes
11 answers
How to grep standard error stream (stderr)?
I am using ffmpeg to get the meta info of an audio clip. But I am unable to grep it.
$ ffmpeg -i 01-Daemon.mp3 |grep -i Duration
FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr…
Andrew-Dufresne
- 5,663
- 7
- 25
- 19
151
votes
2 answers
Difference between pts and tty
Possible Duplicate:
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
I always see pts and tty when I use the who command but I never understand how they are different? Can somebody please explain me this?
pradeepchhetri
- 9,859
- 12
- 51
- 59
151
votes
8 answers
How to sync two folders with command line tools?
Having migrated to Linux from Windows, I would like to find an alternative software to Winmerge or rather learn command line tools to compare and sync two folders on Linux. I would be grateful if you could tell me how to do the following tasks on…
user21417
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
- 98,580
- 191
- 570
- 977
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
- 363,520
- 117
- 767
- 871
151
votes
8 answers
Simple way to create a tunnel from one local port to another?
I have a development server, which is only accessible from 127.0.0.1:8000, not 192.168.1.x:8000. As a quick hack, is there a way to set up something to listen on another port (say, 8001) so that from the local network I could connect…
waitinforatrain
- 1,615
- 2
- 11
- 7
150
votes
15 answers
How to compare two dates in a shell?
How can two dates be compared in a shell?
Here is an example of how I would like to use this, though it does not work as-is:
todate=2013-07-18
cond=2013-07-15
if [ $todate -ge $cond ];
then
break
fi
How can I achieve…
Abdul
- 1,691
- 2
- 13
- 7
150
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,063
- 43
- 82
- 90
149
votes
11 answers
How can I remove the BOM from a UTF-8 file?
I have a file in UTF-8 encoding with BOM and want to remove the BOM. Are there any linux command-line tools to remove the BOM from the file?
$ file test.xml
test.xml: XML 1.0 document, UTF-8 Unicode (with BOM) text, with very long lines
m13r
- 2,635
- 2
- 17
- 14
149
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,076
- 2
- 16
- 9