Most Popular

1500 questions
433
votes
11 answers

How do I add text to the beginning of a file in Bash?

Hi I want to prepend text to a file. For example I want to add tasks to the beginning of a todo.txt file. I am aware of echo 'task goes here' >> todo.txt but that adds the line to the end of the file (not what I want).
user479534
  • 4,541
  • 3
  • 18
  • 6
432
votes
7 answers

How do I exit an SSH connection?

I’m connecting to a server via SSH to send a message to a socket server using a command like: ssh 181.169.1.2 -p 5566 After the connection is established and I write the message and send it I can’t exit the text mode. I’m only allowed to enter…
Andreea
  • 4,431
  • 3
  • 15
  • 9
429
votes
9 answers

How to save a remote server SSL certificate locally as a file

I need to download an SSL certificate of a remote server (not HTTPS, but the SSL handshake should be the same as Google Chrome / IE / wget and curl all give certificate check fail errors) and add the certificate as trusted in my laptops Windows'…
Kimvais
  • 4,698
  • 3
  • 22
  • 19
429
votes
18 answers

Is there a way to "auto login" in PuTTY with a password?

Is there a way to configure a password for a stored session in PuTTY? I know there is the capability to specify an "auto-login username" (under Connection/Data), but is there a way to do the same with the password?
jldupont
  • 6,604
  • 14
  • 38
  • 47
428
votes
24 answers

How to delete directories with path/names too long for normal delete

Windows seems to have a length limit on file names when trying to delete, though it won't prevent those files from being created. Our build process creates a number of temporary files (many build off of a WSDL) that run afoul of this limit. Our ant…
Herms
  • 9,404
  • 9
  • 35
  • 36
426
votes
18 answers

How to prevent Gnome-shell's Alt+Tab from grouping windows from similar apps?

I love pretty much everything about how Gnome Shell handles app-switching through Alt+Tab. My one gripe with it, though, is how it forces the user to use Alt+` (or Alt+ whatever key above the Tab key for non-US keyboard layouts) to switch between…
Waldir Leoncio
  • 5,008
  • 3
  • 20
  • 23
419
votes
11 answers

Clear cache for specific domain name in chrome

I want to clear the cache for a specific domain name in Chrome. Is there an extension or other method that I can use to do this?
Benjamin Crouzier
  • 5,818
  • 11
  • 33
  • 44
415
votes
9 answers

How to get the summarized sizes of directories and their subdirectories?

Let's say I want to get the size of each directory of a Linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system but that also doesn't help me. And with du I…
2ndkauboy
  • 4,343
  • 4
  • 17
  • 8
411
votes
11 answers

How to check which apache modules are enabled/installed?

Which is the most elegant way to check which apache modules are enabled?
udo
  • 8,001
  • 7
  • 38
  • 47
411
votes
11 answers

Selecting columns in Visual Studio Code

Does Visual Studio Code support selecting columns of text? I have not yet found this feature, so I am wondering if it is hidden somewhere. I am familiar with holding down Alt while selecting text, but Visual Studio Code does not behave this way.
ChiliYago
  • 5,005
  • 3
  • 24
  • 22
409
votes
4 answers

How to remove an entry from Chrome's Remembered URLs from the url bar?

I've got a URL in Chrome "local.mysite.com" that autopopulates when I start typing "local.my" into the URL bar. Note that this URL DOES NOT EXIST in my browser history (at chrome://history/#e=1&p=0) because it isn't a real site and therefore…
cmcculloh
  • 5,637
  • 8
  • 25
  • 25
409
votes
12 answers

How can I delete a symbolic link in Windows?

I created a symlink using mklink. Now I need to change it but I can't figure out how to delete it so I can recreate it correctly.
Ben V
  • 4,242
  • 3
  • 19
  • 13
409
votes
20 answers

How to encode base64 via command line?

Is there a terminal command in Mac OS X which will base64 encode a file or stdin?
Josh
  • 9,487
  • 11
  • 49
  • 70
407
votes
7 answers

How to merge audio and video file in ffmpeg

I want to merge an audio file (.wav or .au format) with a video file (.mp4 format). Please suggest me how to achieve this. I want to merge these file to new .mp4 video file. An ffmpeg command would be very welcome.
Sandy
  • 4,629
  • 9
  • 27
  • 27
405
votes
5 answers

What are PATH and other environment variables, and how can I set or use them?

Questions about setting environment variables the PATH are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this. So the question is: What are environment…
slhck
  • 223,558
  • 70
  • 607
  • 592