Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
HIERARCHY OF WEEDZ
Aug 1, 2005

Gambit32 posted:

Good god, how in the world to do I keep vim from making tmp/backup files of EVERYTHING i edit?

Ive got dozens of filename.ext~ files all over my system. I would assume its something in the vimrc file, but I swear im blind because I cant figure which setting it is

help~

What I have in my .vimrc:

code:
set backupdir=~/.vim_backup/
set backup writebackup
Then just mkdir ~/.vim_backup and now all the backups of files will be placed in there. If you want vim to only make backups when it is attempting to write a file and then delete the backup afterwards, use `set nobackup writebackup' instead.

Adbot
ADBOT LOVES YOU

HIERARCHY OF WEEDZ
Aug 1, 2005

Question:

I have a directory with dozens of subdirectories containing a certain file type. I want to grep the entire directory structure for a certain word, but there are binary files I want to avoid searching. Normally I would do something like `grep -Hirn word *.ext', but the root directory doesn't contain a file with a .ext extension, so the grep stops in the root directory and is not recursive. Is there any way to fix this?

EDIT: Nevermind found it!

HIERARCHY OF WEEDZ fucked around with this message at 19:28 on Mar 31, 2007

HIERARCHY OF WEEDZ
Aug 1, 2005

Where's a good place to learn about all the nuances and history regarding terminals and shells? I have a vague idea about them and use them, but I don't know the details about term types, 'termcap', escape characters, and how all of that works. I know that's a horribly vague request, but that's the problem - I don't know exactly what I'm looking for.

EDIT: Okay, a specific thing that might illustrate my point. When I SSH into a system with TERM=xterm-256color and use zsh, hitting backspace causes the cursor to move forward and not remove any characters. I want to know why that is - not why that specific problem occurs, but everything surrounding and leading up to it.

HIERARCHY OF WEEDZ
Aug 1, 2005

What's a good way, from some root directory, to remove all directories in that directory that DON'T contain any file of a certain extension?

HIERARCHY OF WEEDZ
Aug 1, 2005

Thanks! I eventually ended up using find, and learning a lot more about it in the process -

code:
$ find . ! -iname "*.m4p" -and ! -iname "*.mp3" -and ! -iname "*.mp2" -and ! -iname "*.m4a" -and ! -type d - delete
$ find . -empty -delete
First get rid of everything that wasn't what I wanted, then get rid of the empty directories. I'm sure some intrepid zsheller could write a one-liner but this was good enough for me.

HIERARCHY OF WEEDZ
Aug 1, 2005

bitprophet posted:

That's always the best outcome, IMHO :) glad it worked out for you! If find could take regex arguments (no idea) you could probably have consolidated that even further.

It does but I didn't want to trust my data to the chance of a bad regex :-)

HIERARCHY OF WEEDZ
Aug 1, 2005

EDIT: Look below for my question.

HIERARCHY OF WEEDZ
Aug 1, 2005

I have a hosting account on Site5, which only allows a single shell user. I want to have multiple logins to a SVN repository, so I don't have to give out my user's password. I tried following various instructions to allow this, and they seem to work on the SVN side. I have an ~/.ssh/authorized_keys file that looks something like this:

code:
command="/usr/bin/svnserve -t -r /home/host_user/svn --tunnel-user=svn_user" ssh-rsa  AAA...== user@computer
I can now checkout code without providing a password, and all that good stuff—the problem is, when I try SSHing into the server, I get

code:
( success ( 1 2 ( ANONYMOUS EXTERNAL ) ( edit-pipeline svndiff1 absent-entries ) ) ) 
Is there any way to allow 'user@computer' to not only use the repository, but SSH in regularly also?

Adbot
ADBOT LOVES YOU

HIERARCHY OF WEEDZ
Aug 1, 2005

Often I find myself starting a long job in a shell, then wanting to do other things while it works. I can suspend it and start GNU screen, but that job doesn't show up in the new screen terminal, since it's attached to the first shell. Is there any way to move that job to one of the terminals in screen to resume it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply