<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5068841915407132304</id><updated>2011-07-08T02:11:02.755-07:00</updated><title type='text'>Kristopher Grove's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://krisgrove.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5068841915407132304/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://krisgrove.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kristopher Grove</name><uri>http://www.blogger.com/profile/10237371119790706114</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5068841915407132304.post-4789654272836862230</id><published>2007-08-10T06:09:00.000-07:00</published><updated>2010-12-29T20:36:32.856-08:00</updated><title type='text'>Linux Commands</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;module&gt;&lt;executable&gt;&lt;filename&gt;&lt;filename&gt;&lt;filename&gt;&lt;path&gt;&lt;group&gt;&lt;user&gt;&lt;host&gt;&lt;ip&gt;&lt;netmask&gt;&lt;file_path&gt;&lt;target_path&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;(Apt) Package management commands&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo vi /etc/apt/sources.list (loads the list of synaptic sources in vi)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo apt-get install wireless-tools (installs wireless-tools)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo apt-get update (updates packages from synaptic sources)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo apt-cache java | grep sun (searches through the apt cache for java grep sun)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo apt-get install sun-java5-jdk (installs the java 5 package from apt)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;dpkg --list (displays a list of installed packages)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;dpkg -l (displays a list of all installed packages)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;dpkg -S 'name' (find the package containing the executable name provided)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;File permissions&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo chown 655 /opt/lampp/htdocs (change the owner of a file)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo chmod +x /opt/lampp/htdocs (change the permissions of a file)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Finding files&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;locate (searches index for file name)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;grep -r 'text_pattern' * (Recursive search of all file contents under the current directory for the text_pattern)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;find . -type f -iname \*.js (finds a type file with a name like *.js (the backslash is escaped)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;find . -type f -iname \*.fileext -exec grep -nH text_pattern '{}' \;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;find . -type f -exec grep -nH 'search_string' '{}' \; (Look for a file containing the search string)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;find -type f -name entries -exec sed -e 's/130\.109\.180\.26/subversion/g' '{}' \; (not sure what the intent)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Mount Windows share as bob and follow the last 100 lines of the log&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo mount -t smbfs //data/webserver/C$ /mnt/websvr/ -o "username=bob"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;tail -fn 100 /mnt/webserver/temp/log/project/log4j_2007-03-02.log&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span class="Apple-style-span"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Commands to build/compile from source (TAR):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;./configure&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;make&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo make install&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Linux partition map&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/ 10 GB (minimum)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;swap (2GB) - twice the amount of ram, same if ram is above 2GB&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/home (10 GB)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/var (40 GB)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/usr (40 GB)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/data (remaining/max)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Miscellaneous&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;env (prints all environment variables)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;tcpdump (??? Research Please)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;mkdosfs -F 32 -v groveusb /media/usbdisk (formats the disk in FAT32 with a volume label as groveusb)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;none /proc/bus/usb usbfs devgid=1003,devmode=666 0 0 (entry in fstab for usb devices in virtualbox)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;ifrename (deprecated in favor of udev)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;od -tc 1.dat&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/etc/init.d/vmware start (start vmware daemon)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;less /etc/modprobe.d/blacklist (prints a list of blacklisted modules Ex. eth1394)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;mkdir -p /data/projects/project1 (creates each directory recursively)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;/sbin/ifconfig eth0 address netmask up&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;uname -a (displays the kernel version information)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;lspci (displays a list of devices)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;lsmod (displays a list of loaded modules)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo /etc/initd/gdm restart (restarts the x windows)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;ps -fade (displays a list of processes)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;df -h (filesys.info '-h' specifies human readable)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo vim /etc/X11/xorg.conf (loads the x windows configuration in vim)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;lsof (Returns a list of previously opened files)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;ctrl+alt+backspace (restarts X)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;xfontsel (provides a gui for selecting xfont)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;xev (runs an input listener for keyboard and mouse)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;xmodmap -pk (lists the current key mapping)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo tail -f /var/log/messages (follows the contents of system messages)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;sudo tail -n 100 /var/log/messages (displays a list of the last 100 lines of messages)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;dmesg &gt; boot.messages (sends result of dmesg to file)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;div style="font-size: 16px; "&gt;&lt;span class="Apple-style-span" style="font-size: 14px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-size: 14px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/target_path&gt;&lt;/file_path&gt;&lt;/netmask&gt;&lt;/ip&gt;&lt;/host&gt;&lt;/user&gt;&lt;/group&gt;&lt;/path&gt;&lt;/filename&gt;&lt;/filename&gt;&lt;/filename&gt;&lt;/executable&gt;&lt;/module&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5068841915407132304-4789654272836862230?l=krisgrove.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://krisgrove.blogspot.com/feeds/4789654272836862230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5068841915407132304&amp;postID=4789654272836862230' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5068841915407132304/posts/default/4789654272836862230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5068841915407132304/posts/default/4789654272836862230'/><link rel='alternate' type='text/html' href='http://krisgrove.blogspot.com/2007/08/linux-commands.html' title='Linux Commands'/><author><name>Kristopher Grove</name><uri>http://www.blogger.com/profile/10237371119790706114</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
