Most Popular
1500 questions
301
votes
5 answers
Getting colored results when using a pipe from grep to less
I use the --colour option of grep a lot, but I often use less as well. How can I pipe grep results to less and still preserve the coloring. (Or is that possible?)
grep "search-string" -R * --colour | less
EDIT:
I'm looking for a direct solution…
Jeremy Powell
- 7,289
301
votes
9 answers
My windows keyboard is being "clever" with the quote keys - how can I stop it?
I'm using windows 7 on a laptop. On the laptop keyboard, for some reason, the quote key (which has both double and single quote on it) is doing some "clever" annoying things:
When I press single-quote (or double-quote), windows doesn't send any…
Marcin
- 3,285
300
votes
17 answers
How to quickly move current window to another Task View / desktop in Windows 10?
Windows 10 introduced Task View - the ability to have multiple virtual desktops. When I am in a window on Desktop 1, what's the quickest way to move it to Desktop 2?
Currently, I need to enter the task switcher (icon in the Taskbar or Win + Tab),…
Borek Bernard
- 15,019
299
votes
5 answers
What's the equivalent of Linux's updatedb command for the Mac?
If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the corresponding updatedb for the mac?
Thierry Lam
- 4,477
298
votes
12 answers
Can you GPG sign old commits?
Git now has the ability to sign commits with git commit -S, which is great, but sometimes I forget the flag to commit, and sometimes I mail myself patches which I apply with am, and that command doesn't have a flag for signing.
Is there a way to…
Magnus
- 4,696
298
votes
5 answers
Zsh not hitting ~/.profile
I've just installed zsh on my Ubuntu system. It seems zsh isn't executing ~/.profile on init. To my best understanding, this should be an automatic behavior. What am I missing?
shmichael
- 3,343
297
votes
6 answers
How to have Linux ls command show second in time stamp
Something annoying about ls -l command is it shows only hour and minute for a file(like 08:30). How can I see the second portion(like 08:30:44)?
man 1 ls and search for 'second' does not give any clue.
Jimm Chen
- 6,464
296
votes
3 answers
How to connect to a website that has only IPv6 addresses without a domain name?
If a server has only IPv6 addresses without a domain name, how can I connect to the server from my web-browser?
Eonil
- 6,094
296
votes
7 answers
What are differences between VBoxVGA, VMSVGA and VBoxSVGA in VirtualBox?
VirtualBox 6.0 provides a new setting called Graphics Controller. There are four options to choose from:
None
VBoxVGA
VMSVGA
VBoxSVGA
In the user manual I have found this information:
Graphics Controller: Specifies the graphics adapter type used…
Ashark
- 4,047
- 4
- 19
- 30
295
votes
8 answers
Get Last Modified Date of File in Linux
I'm new to Linux. I'm using the command-line. I'm trying to view the last modified date of a file. How do I do that in Linux from the Command Line?
user70192
- 3,089
- 4
- 18
- 8
295
votes
6 answers
How to automatically reload modified files in Notepad++
How can one automatically reload modified files in Notepad++? The confirmation step is annoying, and is completely unnecessary in some situations.
mjsr
- 6,778
293
votes
20 answers
Unix/Linux find and sort by date modified
How can I do a simple find which would order the results by most recently modified?
Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables):
find '$dir' -name '$str'\* -print | head -10
How…
Richard Easton
292
votes
10 answers
Get a list of Open Ports in Linux
I need a Linux command to list all free open ports for use in an application
lsof -i TCP| fgrep LISTEN
Does not seen to be helping as the Ports it lists are not necessarily free for use. How do I list free open ports not in use?
Stanley Mungai
- 3,030
292
votes
7 answers
When should I use /dev/shm/ and when should I use /tmp/?
When should I use /dev/shm/ and when should I use /tmp/? Can I always rely on them both being there on UNIX?
Deleted
- 5,488
291
votes
5 answers
How do I make Windows 10's File Explorer open "This PC" by default?
I know how to do that on Windows Vista and Windows 7, and I know how to do that on Windows 8 and Windows 8.1, but neither of the ways work with Windows 10; it always defaults into the "Home" view.
(I am basically reposting this question for…
kaboom1
- 3,047