Fork me on GitHub
Nation Pigeon

Viewing Tags bash

Install Mongo DB on Debian with PHP support

13th August 12 | Linux

Steps to Install MongoDB – This should work with Debian and Ubuntu, with the upstart init system. sudo apt-key adv –keyserver keyserver.ubuntu.com –recv 7F0CEB10 && sudo sh -c ‘echo ”deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen” > /etc/apt/sources.list.d/10gen.list’ && sudo apt-get update && sudo apt-get install mongodb-10gen; If all goes well you should have a fully working MongoDB. [...]

[ Read More → ]

Webserver File Permissions

6th August 12 | Linux

From what I have found out, the standard permissions should go along the lines of

  • Directories 755
  • PHP 600
  • Everything Else 644
[ Read More → ]

Debian Bash Auto Completion

20th June 12 | Linux

Install the bash auto completion package. sudo apt-get install bash-completion Uncomment the following in /etc/bash.bashrc to enable to auto completion. You will need to open a new terminal after doing this. sudo vi /etc/bash.bashrc # enable bash completion in interactive shells if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi [...]

[ Read More → ]

Set keyboard mapping via CLI

18th December 11 | Linux

If you’ve just installed a fresh copy of *Unix or your using a Live distribution. I find this command much easier that looking though all the menus. setxkbmap gb As long as your running X.org, you’re in luck.

[ Read More → ]

Get a list of filenames and move the files Bash and Power Shell

17th August 11 | Linux, Windows

Both these scripts do the same thing, they strip a log file down to the filename and then move each file up a directory. … C:\Random\Directory\n\chars\long\filename.xml … BASH cat 15\ August\ 2011\ Less.log | cut -c 113-152 > fileNames for i in `cat fileNames`; do mv -v “$i” ../$i; done WINDOWS gc ‘.\15 August 2011 [...]

[ Read More → ]

Synergy Config

27th July 11 | Linux

To get synergy working, both the client and the server need to have a /etc/synergy.conf file, like the one below. make sure to replace “server” and “client” with their respective hostnames: section: screens server: client: end section: aliases server: 10.0.0.2 end section: aliases client: 10.0.0.50 end section: links server: left = client client: right = [...]

[ Read More → ]

Find out your Ubuntu/Debian Release

24th July 11 | Linux

lsb_release -c or cat /etc/debian_version I can never remember, and now you don’t have to.

[ Read More → ]

Get the first n chars for each line of a file

27th June 11 | Linux

cat file | colrm n File’s contents: 8765 I like eating pie 8956 Sometimes I think I’m a robot 8796 I wonder what being a cat is like 4567 Time for food 4523 Pew Pew pew Space pope8765 I like eating pie cat file | colrm 4 Output: 876 895 879 456 452 Hope that [...]

[ Read More → ]

Find Command

6th May 11 | Linux

The find command is very useful for organizing your files and folders, or in combination with bash scripting. For example I had an mp3 player which would only play mp3s that were not inside a directory.  Now all my music is located inside sub-directories, so I could spend most of my day moving them out, [...]

[ Read More → ]

How to create linked files

31st March 11 | Linux

A linked file is a file that contains a reference to another file or directory. There are two types on linkes soft and hard. A hard link can not access folders on a diffrent volume, where as soft links can. Heres how to create soft link files. ln -s source_file link_name ln -s /media/Gama Gama [...]

[ Read More → ]

Go Back in Time »

Copyright © 2007 ∞ Nation Pigeon - Designed by Peter Mayanrd
Theme Based on Black-Green - Fork it on GitHub