<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Joomla! - Open Source Content Management" -->
<feed xmlns="http://www.w3.org/2005/Atom"  xml:lang="en-gb">
	<title type="text">Linux stuff</title>
	<subtitle type="text">Random bits of knowledge gathered over the years. Mostly IT related, but recipes etc will do, too.</subtitle>
	<link rel="alternate" type="text/html" href="https://dynamic.bubbakraut.com"/>
	<id>https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies</id>
	<updated>2021-01-14T10:20:35+01:00</updated>
	<author>
		<name>BubbaKraut.com</name>
		<email>admin@bubbakraut.com</email>
	</author>
	<generator uri="https://www.joomla.org">Joomla! - Open Source Content Management</generator>
	<link rel="self" type="application/atom+xml" href="https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies?format=feed&amp;type=atom"/>
	<entry>
		<title>New Mysql Database (and user)</title>
		<link rel="alternate" type="text/html" href="https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/35-new-mysql-database-and-user"/>
		<published>2012-10-30T11:37:11+01:00</published>
		<updated>2012-10-30T11:37:11+01:00</updated>
		<id>https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/35-new-mysql-database-and-user</id>
		<author>
			<name>Sven Jambor</name>
			<email>admin@bubbakraut.com</email>
		</author>
		<summary type="html">&lt;p&gt;Alrighty, it's an easy one, but I keep going astray. So here's how to set up a new MySQL database and add a user while at it. All at the command line, of course.&lt;/p&gt;
&lt;p&gt;$ mysql -u ''adminusername'' -p&lt;/p&gt;
&lt;p&gt;mysql&amp;gt; CREATE DATABASE ''databasename''; &lt;br /&gt;mysql&amp;gt; GRANT ALL PRIVILEGES ON ''databasename''.* TO &quot;''username''&quot;@&quot;''hostname''&quot; IDENTIFIED BY &quot;''password''&quot;;&lt;br /&gt;mysql&amp;gt; FLUSH PRIVILEGES;&lt;br /&gt;mysql&amp;gt; EXIT&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Alrighty, it's an easy one, but I keep going astray. So here's how to set up a new MySQL database and add a user while at it. All at the command line, of course.&lt;/p&gt;
&lt;p&gt;$ mysql -u ''adminusername'' -p&lt;/p&gt;
&lt;p&gt;mysql&amp;gt; CREATE DATABASE ''databasename''; &lt;br /&gt;mysql&amp;gt; GRANT ALL PRIVILEGES ON ''databasename''.* TO &quot;''username''&quot;@&quot;''hostname''&quot; IDENTIFIED BY &quot;''password''&quot;;&lt;br /&gt;mysql&amp;gt; FLUSH PRIVILEGES;&lt;br /&gt;mysql&amp;gt; EXIT&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</content>
		<category term="Newbies in Command " />
	</entry>
	<entry>
		<title>Pack it up, dude</title>
		<link rel="alternate" type="text/html" href="https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/23-pack-it-up-dude"/>
		<published>2011-10-03T14:20:53+02:00</published>
		<updated>2011-10-03T14:20:53+02:00</updated>
		<id>https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/23-pack-it-up-dude</id>
		<author>
			<name>Sven Jambor</name>
			<email>admin@bubbakraut.com</email>
		</author>
		<summary type="html">&lt;p&gt;Okay, I just realized that giving instructions on how to unpack archives is neat - but about creating tar.gz archives?&lt;/p&gt;
&lt;p&gt;Easy: Just use&lt;/p&gt;
&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot;&gt;&lt;p&gt;tar -cvpzf &amp;lt;output filename&amp;gt; &amp;lt;directory&amp;gt;&lt;/p&gt;&lt;p&gt;this means:
-c = create new archive
-v = be verbose&lt;/p&gt;&lt;p&gt;-p = preserver permissions
-z = compress using gzip
-f = filename to create for the new archive

for the directory dont to &quot;directory/*&quot; just to &quot;directory&quot; with no slash

filenames should end in &quot;.tar.gz&quot; as they are tarr'ed then zipped&lt;/p&gt;&lt;/pre&gt;</summary>
		<content type="html">&lt;p&gt;Okay, I just realized that giving instructions on how to unpack archives is neat - but about creating tar.gz archives?&lt;/p&gt;
&lt;p&gt;Easy: Just use&lt;/p&gt;
&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot;&gt;&lt;p&gt;tar -cvpzf &amp;lt;output filename&amp;gt; &amp;lt;directory&amp;gt;&lt;/p&gt;&lt;p&gt;this means:
-c = create new archive
-v = be verbose&lt;/p&gt;&lt;p&gt;-p = preserver permissions
-z = compress using gzip
-f = filename to create for the new archive

for the directory dont to &quot;directory/*&quot; just to &quot;directory&quot; with no slash

filenames should end in &quot;.tar.gz&quot; as they are tarr'ed then zipped&lt;/p&gt;&lt;/pre&gt;</content>
		<category term="Newbies in Command " />
	</entry>
	<entry>
		<title>Finding a string in text files</title>
		<link rel="alternate" type="text/html" href="https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/8-findstringinfiles"/>
		<published>2011-04-11T21:33:50+02:00</published>
		<updated>2011-04-11T21:33:50+02:00</updated>
		<id>https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/8-findstringinfiles</id>
		<author>
			<name>Sven Jambor</name>
			<email>admin@bubbakraut.com</email>
		</author>
		<summary type="html">&lt;p&gt;One of the great things with Linux is that almost all files are out there in the open. Configuration of the OS, application config files, php files of your webserver, etc. There's only one problem: there's way too many files to find what you're looking for. Now what?&lt;/p&gt;
</summary>
		<content type="html">&lt;p&gt;One of the great things with Linux is that almost all files are out there in the open. Configuration of the OS, application config files, php files of your webserver, etc. There's only one problem: there's way too many files to find what you're looking for. Now what?&lt;/p&gt;
</content>
		<category term="Newbies in Command " />
	</entry>
	<entry>
		<title>Unpack that stuff</title>
		<link rel="alternate" type="text/html" href="https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/2-unpacking"/>
		<published>2011-03-29T23:18:51+02:00</published>
		<updated>2011-03-29T23:18:51+02:00</updated>
		<id>https://dynamic.bubbakraut.com/linuxstuff/8-commandlinenewbies/2-unpacking</id>
		<author>
			<name>Sven Jambor</name>
			<email>admin@bubbakraut.com</email>
		</author>
		<summary type="html">&lt;p&gt;Well, well, the old lady let you move back in, did she? Time to unpack your bags, then.&lt;/p&gt;
&lt;p&gt;In case you happen to be a Linux or Unix server, that might be a bit of an issue. Sure, we all know what to do with zip files in Windows - but what about them tar or gz files? No worries - Bubba to the Rescue.&lt;/p&gt;
&lt;p&gt;Here's what you do:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;To unpack a tar.gz file&lt;/strong&gt;&lt;/span&gt;, you can use the tar command from the shell. Here's an example:&lt;/p&gt;
&lt;pre&gt;tar -xzf bubba.tar.gz&lt;/pre&gt;
&lt;p&gt;The result will be a new directory containing the files.&lt;/p&gt;
&lt;p&gt;Of course, this was the way we did things back then in the old days. Nowadays, when you download the tar.gz from a web browser, a lot of times an unpacker will open - and you can just use that. But that's for whimps. Or Yankees. Or both.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;For just .gz (.gzip)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In some cases the file is just a gzip format, not tar. Then you can use:&lt;/p&gt;
&lt;pre&gt;gunzip bubba.gz&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Well, well, the old lady let you move back in, did she? Time to unpack your bags, then.&lt;/p&gt;
&lt;p&gt;In case you happen to be a Linux or Unix server, that might be a bit of an issue. Sure, we all know what to do with zip files in Windows - but what about them tar or gz files? No worries - Bubba to the Rescue.&lt;/p&gt;
&lt;p&gt;Here's what you do:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;To unpack a tar.gz file&lt;/strong&gt;&lt;/span&gt;, you can use the tar command from the shell. Here's an example:&lt;/p&gt;
&lt;pre&gt;tar -xzf bubba.tar.gz&lt;/pre&gt;
&lt;p&gt;The result will be a new directory containing the files.&lt;/p&gt;
&lt;p&gt;Of course, this was the way we did things back then in the old days. Nowadays, when you download the tar.gz from a web browser, a lot of times an unpacker will open - and you can just use that. But that's for whimps. Or Yankees. Or both.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;For just .gz (.gzip)&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In some cases the file is just a gzip format, not tar. Then you can use:&lt;/p&gt;
&lt;pre&gt;gunzip bubba.gz&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</content>
		<category term="Newbies in Command " />
	</entry>
</feed>
