Most Popular

1500 questions
167
votes
3 answers

The name > org.freedesktop.PolicyKit1 was not provided by any .service files

When attempting to launch system-config-users from command line, I get the following warning, and the tool does not open. I'm using CentOS 7 with Mate 1.8.1. WARNING **: Error enumerating actions: …
a coder
  • 3,253
166
votes
4 answers

How does the sticky bit work?

SUID The sticky bit applied to executable programs flagging the system to keep an image of the program in memory after the program finished running. But I don't know that what it's stored in memory. And how I can see them, in this case.?
lotusirous
  • 3,669
166
votes
4 answers

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a process that is filling up a log file at a terrific…
dotancohen
  • 15,864
166
votes
4 answers

Get the chmod numerical value for a file

In FreeBSD and also in Linux, how can I get the numerical chmod value of a file? For example, 644 instead of -rw-r--r--? I need an automatic way for a Bash script.
me.at.coding
  • 3,117
166
votes
5 answers

How to find application's path from command line?

For example, I have git installed on my system. But I don't remember where I installed it, so which command is fit to find this out?
Anders Lind
  • 2,385
166
votes
6 answers

How can I communicate with a Unix domain socket via the shell on Debian Squeeze?

I’m running a Debian Squeeze web server. I’ve installed memcached on it, and configured memcached to listen on a Unix domain socket (at /tmp/memcached.sock), as it only needs to receive messages from the website, which lives on the same server. It…
166
votes
11 answers

How to open rar file in linux?

I have a file with .rar extension, ex: foo.rar I want to extract content from that file, how do I extract it?
shas
  • 2,688
166
votes
3 answers

How to change ownership of symbolic links?

I am facing some issue with creating soft links. Following is the original file. $ ls -l /etc/init.d/jboss -rwxr-xr-x 1 askar admin 4972 Mar 11 2014 /etc/init.d/jboss Link creation is failing with a permission issue for the owner of the file: ln…
Zama Ques
  • 3,276
166
votes
8 answers

Use scp to transfer a file from local directory X to remote directory Y

I took a look around at other questions here and at various "scp usage" tutorials on Internet, but I can't sort out what's wrong. I'm using Linux Mint and I'm trying to figure out how scp works. I've a file file.ext (on my computer) in directory…
dragonmnl
  • 2,239
165
votes
1 answer

What's the recommended way of copying changes with vimdiff?

When comparing files, and updating a source code repository, I like to use vimdiff. To copy changes made from one file to the other, I usually use a key sequence like this:- Shift + V (select line) k or j; { or }; Up or down arrow keys (select more…
Alex Leach
  • 7,910
165
votes
2 answers

How to disable auto suspend when I close laptop lid?

I'm using archlinux. It never auto-suspend before a recent system upgrade(maybe I updated the kernel?). I think it is related to laptop-mode or acpid, so I stop them: /etc/rc.d/laptop-mode stop /etc/rc.d/acpid stop I also edit…
heiz
  • 1,803
165
votes
13 answers

Convince grep to output all lines, not just those with matches

Say I have the following file: $ cat test test line 1 test line 2 line without the search word another line without it test line 3 with two test words test line 4 By default, grep returns each line that contains the search term: $ grep test…
Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
165
votes
7 answers

Can I configure my Linux system for more aggressive file system caching?

I am neither concerned about RAM usage (as I've got enough) nor about losing data in case of an accidental shut-down (as my power is backed, the system is reliable and the data are not critical). But I do a lot of file processing and could use some…
Ivan
  • 17,708
165
votes
6 answers

How can I count the number of lines of a file with common tools?

I am redirecting grep results to a file, and then using cat to show its contents on the screen. I want to know how many lines of results I have in my results file and then add it to some counter. What will be the best way? Any relevant flag to grep…
k-man
165
votes
3 answers

Download using wget to a different directory than current directory

I need to use wget to download a file to the directory /var/cache/foobar/ (so, as an example, if I download stackexchange-site-list.txt, it'd be downloaded to /var/cache/foobar/stackexchange-site-list.txt) Is this possible? curl would also be an…
jrg
  • 4,316