So I have a slight problem…I unrared a crapton if files which are now all in their own directories and those directories are inside other directories.
Main/file1/file1unrared/file1.txt
So I want all those text file to just sit in Main not 2 dirs down from there.
If my current directory is Main, I can do this:
find . -type f -iname ‘*.txt’ -exec mv ‘{}’ . \; find . -type d -exec rm -rf ‘{}’ .
Just so I would remember, I just installed a debian vm and came across a problem I’ve never seen before.
# iptables-save > iptables.rules Unable to open /proc/net/ip_tables_names: No such file or directory.
It seems that the module needs to be loaded before you can use iptables-save.
To fix this, run the command “modprobe ip_tables” and everything should work fine.
weird..
So I was in a dilemma. I have a gazillion files that have spaces.
Spaces in linux = really annoying to work with mainly in the shell.
*A quick explanation of sed (needed to understand these scripts):*
sed ’s/thingtoreplace/replacewith/g’
This will replace any instance of “thingtoreplace” with “replacewith” in a whole line of text.
you must remember that sed works on a line by line basis, not file by file.
So not everyone uses NFS. Actually most use sftp on linux since they can just use already existing open ssh ports to transfer data encrypted. The other problem is that many of us need to access smb/cifs shares on our linux boxes as well in an easy and simple fashion.
So here’s a little insight into how to do this.
I like to mount sftp shares to my home dir in linux.
So Hitachi has this new Enterprise grade drive with a 2 million MTBF (Mean time before failure) rating and 3TB storage capacity.
I must say, this is pretty epic. Plus, I just learned that their storage part of the company bought the IBM storage division in the early 2000?s.
1up for Hitachi. Never really took them seriously but they have good reviews on newegg and seem to be actually innovating. I’m impressed.
OMFG I AM TIRED OF typing MY PASSWD@#$^@#%^#@$^
Here’s how to generate ssh keys you can use to automatically login to a remote server.
1: First, on either machine, create the keys. a) Run the command, “ssh-keygen -t rsa” b) Accept the default options by basically pushing enter through them 2: Now you should have a id_rsa file and an id_rsa.pub file. a) Move the id_rsa (your private key file) to the client computer in the ~/.
Lets say you have a bunch of sweet rules in iptables but there’s an application you are trying to install and it just will not work. You think it might be the restriction’s in your firewall but you don’t feel like toying with it right now.
Easiest thing to do? Just clear out everything and allow all traffic for the time being (until you can get that damn application to work) Here’s a script that will help you do just that.
Some quick info about cron and how to setup jobs etc..
crontab -e Edit your crontab file, or create one if it doesn’t already exist. Each user has their own cron jobs they can setup and specify. There is not just one crontab for all users on the machine.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
Each entry in a crontab file consists of six fields, specifying in the following order:
So on the network that I use, the admin’s like to use IPv4 but have support for IPv6 as well. So there’s always a bunch of IPv6 addresses that my NIC’s get attacked with every time they contact the DHCP server.
I really don’t need all that crap and I would like to speed up my DNS queries by not worrying about IPv6.
So here’s how to disable it…. 1: Open your /etc/modprobe.
In the past, I’ve had different run in’s with installing rtorrent on different linux distro’s. But I eventually found a surefire way to install it on Debian.
Your working directory doesn’t really matter. I would suggest /tmp or your ~. I also recommend not installing this as root. It’s just a bad idea.
FIRST:
sudo apt-get install build-essential libsigc++-2.0-dev pkg-config comerr-dev libcurl4-openssl-dev libidn11-dev libkadm55 libkrb5-dev libssl-dev zlib1g-dev libncurses5 libncurses5-dev
THEN :