﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AIgor%2FLinux_Tips</id>
	<title>利用者:Igor/Linux Tips - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AIgor%2FLinux_Tips"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Igor/Linux_Tips&amp;action=history"/>
	<updated>2026-05-24T04:40:34Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Igor/Linux_Tips&amp;diff=50460&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Igor/Linux_Tips&amp;diff=50460&amp;oldid=prev"/>
		<updated>2018-06-28T17:49:10Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 17:49時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Igor/Linux_Tips&amp;diff=50459&amp;oldid=prev</id>
		<title>2007年9月4日 (火) 19:27にwiki&gt;Igorによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Igor/Linux_Tips&amp;diff=50459&amp;oldid=prev"/>
		<updated>2007-09-04T19:27:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== annoyances ==&lt;br /&gt;
&lt;br /&gt;
* Xlib: connection to &amp;quot;:0.0&amp;quot; refused by server&lt;br /&gt;
: Try to delete ~/.Xauthority and restart X server&lt;br /&gt;
* Gnome panel crash&lt;br /&gt;
: Try to delete ~/.recently-used and restart X server&lt;br /&gt;
* You can found [[Linux_tips#email_autoresponder|email autoresponder]] annoying if you are with this username on some mailing list, they won't be happy if they'll receiving your 'kind' responding...&lt;br /&gt;
&lt;br /&gt;
== Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Proxy ===&lt;br /&gt;
&lt;br /&gt;
* Read about proxy setup in [[Program D]].&lt;br /&gt;
&lt;br /&gt;
== cron ==&lt;br /&gt;
&lt;br /&gt;
'''cron'''  searches its spool area (/var/spool/cron/crontabs) for crontab files (which are named after accounts in /etc/passwd); crontabs found are loaded into memory.  Note that crontabs in this directory should not be accessed directly - the crontab  command  should  be  used  to access and update them.&lt;br /&gt;
&lt;br /&gt;
 Minute	Hour	DOM	Month	DOW	Full File Location				&lt;br /&gt;
 0	3	*	*	*	/home/mysql_backup_day/some_backup.sql	&lt;br /&gt;
 In this example it is run every day of every week of every month at 3:00AM.&lt;br /&gt;
 Minute: 0-59 are valid									&lt;br /&gt;
 Hour: 24 hour clock (army time)								&lt;br /&gt;
 Day Of Month: 1-31 are valid									&lt;br /&gt;
 Month: 1-12 are valid (1 is January, 2 is February)						&lt;br /&gt;
 Day Of Week: 0-6 are valid (0 is Sunday, 1 is Monday)						&lt;br /&gt;
 Full File Location: Make sure you put the FULL path to the script you're automating.&lt;br /&gt;
&lt;br /&gt;
If you wish to diasble the email (and not output to a log file) then, at the end of each of the cron job lines you wish to not be notified on, place the command:&lt;br /&gt;
&lt;br /&gt;
: &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
== ffmpeg ==&lt;br /&gt;
&lt;br /&gt;
'''How do I encode JPEGs to another format ?'''&lt;br /&gt;
&lt;br /&gt;
If the JPEGs are named img1.jpg, img2.jpg, img3.jpg,..., use:&lt;br /&gt;
&lt;br /&gt;
  ffmpeg -i img%d.jpg /tmp/a.mpg&lt;br /&gt;
&lt;br /&gt;
 `%d' is replaced by the image number.&lt;br /&gt;
&lt;br /&gt;
 `img%03d.jpg' generates `img001.jpg', `img002.jpg', etc...&lt;br /&gt;
&lt;br /&gt;
The same system is used for the other image formats.&lt;br /&gt;
&lt;br /&gt;
== find ==&lt;br /&gt;
&lt;br /&gt;
To make tar archive of files that was changed in the last 24h:&lt;br /&gt;
&lt;br /&gt;
: tar cvzf ime.tar.gz `find . -mtime 1`&lt;br /&gt;
&lt;br /&gt;
== PGP ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.chaosreigns.com/code/sigtrace/ PGP PathTrace]&lt;br /&gt;
&lt;br /&gt;
== grep ==&lt;br /&gt;
&lt;br /&gt;
* Getting lots of &amp;quot;404&amp;quot; errors for &amp;quot;oldimage.gif&amp;quot; in your site stats? Use grep to find the offending pages:&lt;br /&gt;
: grep -R &amp;quot;oldimage.gif&amp;quot; /var/www/html&lt;br /&gt;
&lt;br /&gt;
== hdup ==&lt;br /&gt;
&lt;br /&gt;
* Is there some other way to open all those *.tar.gz files? I can open only first file?&lt;br /&gt;
: You can just cat the chunks together cat file1 file2 &amp;gt; huge_file.tar.gz and untar that one.&lt;br /&gt;
&lt;br /&gt;
== mail ==&lt;br /&gt;
&lt;br /&gt;
: echo Coming home for dinner! | mail sylvia@home.com&lt;br /&gt;
&lt;br /&gt;
=== Sending HTML ===&lt;br /&gt;
&lt;br /&gt;
This works for me:&lt;br /&gt;
&lt;br /&gt;
* mail -a &amp;quot;Content-type: text/html;&amp;quot; -s &amp;quot;Subject Title&amp;quot; some@domain.name &amp;lt; /home/local/web/mail.html&lt;br /&gt;
&lt;br /&gt;
* You have to send HTML as attachment, some programs can do this from command line, one is '''mutt''' ''(hmm, how to set Content-type: text/html as first attachment?)'':&lt;br /&gt;
&lt;br /&gt;
: $ mutt -a syslogs.tar.gz admin@domain.org &amp;lt; /dev/null&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: $ echo | mutt -a syslogs.tar.gz admin@domain.org&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: $ mutt -s &amp;quot;Birthday celebration&amp;quot; -a citymap.jpg all@friends.org \ &amp;lt; invitation.txt&lt;br /&gt;
&lt;br /&gt;
''For more check this URL:'' http://www.shelldorado.com/articles/mailattachments.html&lt;br /&gt;
&lt;br /&gt;
=== email autoresponder ===&lt;br /&gt;
&lt;br /&gt;
* vacation&lt;br /&gt;
&lt;br /&gt;
Create at your $HOME directory two files: '''.forward''' ''(dot forward)'' and '''.vacation.msg''' ''(dot vacation.msg)''&lt;br /&gt;
&lt;br /&gt;
In file '''.forward''' you can put:&lt;br /&gt;
&lt;br /&gt;
 username1, username@domain.name, &amp;quot;|/usr/bin/vacation -r 7 username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Where is '''username''' sender and '''username1''', etc. receive notification (bcc) + send to program vacation. Be careful with '''-r''' switch, this stands for replies in days. I try with '''-r 0''' and I recieved 28000 replies :/&lt;br /&gt;
&lt;br /&gt;
In file '''.vacation.msg''' you can put on example:&lt;br /&gt;
&lt;br /&gt;
 From: username@domain.name  &lt;br /&gt;
 Subject: Re: $SUBJECT&lt;br /&gt;
 This is just an e-mail receive confirmation. &lt;br /&gt;
 You don't need to reply on this message. Thank you.&lt;br /&gt;
&lt;br /&gt;
: Where is '''$SUBJECT''' content of received subject.&lt;br /&gt;
&lt;br /&gt;
=== Install Courier ===&lt;br /&gt;
&lt;br /&gt;
* http://talk.trekweb.com/~jasonb/articles/exim_maildir_imap.shtml#id2447649&lt;br /&gt;
* http://www.inter7.com/courierimap/INSTALL.html&lt;br /&gt;
&lt;br /&gt;
=== Secure Mail Relaying with Exim and OpenSSL ===&lt;br /&gt;
&lt;br /&gt;
* [http://jeremy.zawodny.com/blog/archives/000453.html Howto Secure Mail Relaying with Exim and OpenSSL]&lt;br /&gt;
* [http://hublog.hubmed.org/archives/001075.html Ssl Cerificates Howto]&lt;br /&gt;
&lt;br /&gt;
== mplayer ==&lt;br /&gt;
&lt;br /&gt;
* mplayer can convert video to animated gif:&lt;br /&gt;
: mplayer -vo gif89a video.avi&lt;br /&gt;
&lt;br /&gt;
== mysql ==&lt;br /&gt;
&lt;br /&gt;
* How to see all databases&lt;br /&gt;
: mysqlshow -p&lt;br /&gt;
&lt;br /&gt;
* If you get error when dump database like: /usr/bin/mysqldump: Got error: 1016: Can't open file: 'old.MYI'. (errno: 145) when using LOCK TABLES&lt;br /&gt;
&lt;br /&gt;
: You can repaire it like this: use the mysql client, use database name then type: repair table old;&lt;br /&gt;
: and don't forget to make backup before!&lt;br /&gt;
&lt;br /&gt;
== netcat ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;UnNamed&amp;gt;: machineA creates a tar file and pipes to netcat, and machineB has netcat listening in portB and sends the data to tar, which unpacks:&lt;br /&gt;
&lt;br /&gt;
: machine A sends data&lt;br /&gt;
:: cd somewhere/ ; tar -cf - * | nc -q 30 machineB portB&lt;br /&gt;
: machine B receives data&lt;br /&gt;
:: cd destination ; nc -q 5 -l -p portB | tar -xkf -&lt;br /&gt;
&lt;br /&gt;
== Ports ==&lt;br /&gt;
&lt;br /&gt;
* To check what program using some ports:&lt;br /&gt;
: netstat -plunt&lt;br /&gt;
&lt;br /&gt;
== root-tail ==&lt;br /&gt;
&lt;br /&gt;
* /usr/bin/root-tail -g 1260x960+10+10 --wordwrap -font fixed -id `xprop -root XFCE_DESKTOP_WINDOW | cut -d' ' -f5` /var/log/syslog,#B0C4DE,'SYSTEM LOG' &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== SSH ==&lt;br /&gt;
&lt;br /&gt;
* Part of the ssh protocol makes sure you are really connecting to the machine you think you are, and warns if it notices anything wrong. Although the fixed keys are convenient at times, you should consider generating unique keys. To replace the keys, use these commands to overwrite the keys stored in your nest.&lt;br /&gt;
&lt;br /&gt;
: ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N &amp;quot;&amp;quot;&lt;br /&gt;
: ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
: ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Password-less logins can make working with multiple machines much smoother. The first step is to create a public/private key pair on the local machine with the command:&lt;br /&gt;
&lt;br /&gt;
: ssh-keygen -t dsa&lt;br /&gt;
&lt;br /&gt;
Then repeat this procedure starting from your local machine for each remote d:b you want to access:&lt;br /&gt;
&lt;br /&gt;
: scp .ssh/id_dsa.pub root@remote-ip-address:.ssh/temp.pub&lt;br /&gt;
: ssh remote-ip-address&lt;br /&gt;
: cd .ssh&lt;br /&gt;
: cat temp.pub &amp;gt;&amp;gt; authorized_keys&lt;br /&gt;
: rm temp.pub&lt;br /&gt;
: logout&lt;br /&gt;
&lt;br /&gt;
Note that you will be prompted for a password for the scp and ssh commands.&lt;br /&gt;
&lt;br /&gt;
* scp, secure copy, allows you to copy files to and from remote machines just as simply as using cp to copy a file locally. Files are encrypted in the transfer to prevent revealing the contents to anyone 'sniffing' on the network. You can specify local or remote files for source or targets in the form username@hostname:filespec. You can omit username if the same username is used on both systems, and you can omit hostname if the file refered to is on the local machine. For example, to copy /etc/rc.local from a remote system to your current directory, you could use a command like:&lt;br /&gt;
: scp root@192.168.1.2:/etc/rc.local .&lt;br /&gt;
&lt;br /&gt;
== tar ==&lt;br /&gt;
&lt;br /&gt;
* How to untar bar-package.tar.bz2 ?&lt;br /&gt;
&lt;br /&gt;
: tar xjvf bar-package.tar.bz2&lt;br /&gt;
&lt;br /&gt;
* How to create a gzipped archive, archive.tar.gz?&lt;br /&gt;
&lt;br /&gt;
: tar -czvf archive.tar.gz file1 file2 dir/&lt;br /&gt;
&lt;br /&gt;
== time ==&lt;br /&gt;
&lt;br /&gt;
* Put this line in root crontab for setting system &amp;amp; hw clock, every day @ 5:05 am:&lt;br /&gt;
&lt;br /&gt;
: 5 5 * * *	/usr/sbin/ntpdate ntp1.arnes.si &amp;gt;&amp;gt; /var/log/timelog.log; /sbin/hwclock --systohc&lt;br /&gt;
&lt;br /&gt;
== wget ==&lt;br /&gt;
&lt;br /&gt;
Overview&lt;br /&gt;
&lt;br /&gt;
Wget is a network utility to retrieve files from the Web using http and ftp, the two most widely used Internet protocols . It works non-interactively, so it will work in the background, after having logged off. The program supports recursive retrieval of web-authoring pages as well as ftp sites. You can use wget to make mirrors of archives and home pages or to travel the Web like a WWW robot.&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
The examples are classified into three sections, because of clarity. The first section is a tutorial for beginners. The second section explains some of the more complex program features. The third section contains advice for mirror administrators, as well as even more complex features (that some would call perverted).&lt;br /&gt;
&lt;br /&gt;
Simple Usage&lt;br /&gt;
&lt;br /&gt;
* Say you want to download a URL. Just type:&lt;br /&gt;
&lt;br /&gt;
: wget http://foo.bar.com/&lt;br /&gt;
&lt;br /&gt;
* But what will happen if the connection is slow, and the file is lengthy? The connection will probably fail before the whole file is retrieved, more than once. In this case, Wget will try getting the file until it either gets the whole of it, or exceeds the default number of retries (this being 20). It is easy to change the number of tries to 45, to insure that the whole file will arrive safely:&lt;br /&gt;
&lt;br /&gt;
: wget --tries=45 http://foo.bar.com/jpg/flyweb.jpg&lt;br /&gt;
&lt;br /&gt;
* Now let's leave Wget to work in the background, and write its progress to log file ' log '. It is tiring to type ' --tries ', so we shall use ' -t '.&lt;br /&gt;
&lt;br /&gt;
: wget -t 45 -o log http://foo.bar.com/jpg/flyweb.jpg &amp;amp;&lt;br /&gt;
&lt;br /&gt;
* The ampersand at the end of the line makes sure that Wget works in the background. To unlimit the number of retries, use ' -t inf '.&lt;br /&gt;
&lt;br /&gt;
* The usage of FTP is as simple. Wget will take care of login and password.&lt;br /&gt;
&lt;br /&gt;
: wget ftp://foo.bar.com/welcome.msg&lt;br /&gt;
&lt;br /&gt;
ftp://foo.download.com/welcome.msg&lt;br /&gt;
    =&amp;gt; 'welcome.msg'&lt;br /&gt;
    Connecting to foo.download.com:21... connected!&lt;br /&gt;
    Logging in as anonymous ... Logged in!&lt;br /&gt;
    ==&amp;gt; TYPE I ... done. ==&amp;gt; CWD not needed.&lt;br /&gt;
    ==&amp;gt; PORT ... done. ==&amp;gt; RETR welcome.msg ... done.&lt;br /&gt;
&lt;br /&gt;
* Download Oracle 9i Manuals to your local directory using CYGWINs wget&lt;br /&gt;
&lt;br /&gt;
: wget -q --tries=45 -r \&lt;br /&gt;
&lt;br /&gt;
: http://download-east.oracle.com/otndoc/oracle9i/901_doc&lt;br /&gt;
&lt;br /&gt;
Advanced Usage&lt;br /&gt;
&lt;br /&gt;
* You would like to read the list of URLs from a file? Not a problem with that:&lt;br /&gt;
&lt;br /&gt;
: wget -i file&lt;br /&gt;
&lt;br /&gt;
If you specify ' - ' as file name, the URLs will be read from standard input.&lt;br /&gt;
&lt;br /&gt;
* Create a mirror image of GNU WWW site (with the same directory structure the original has) with only one try per document, saving the log of the activities to ' gnulog ':&lt;br /&gt;
&lt;br /&gt;
: wget -r -t1 http://foo.bar.com/ -o gnulog&lt;br /&gt;
&lt;br /&gt;
* Retrieve the first layer of yahoo links:&lt;br /&gt;
&lt;br /&gt;
: wget -r -l1 http://www.yahoo.com/&lt;br /&gt;
&lt;br /&gt;
* Retrieve the index.html of ' www.lycos.com ', showing the original server headers:&lt;br /&gt;
&lt;br /&gt;
: wget -S http://www.lycos.com/&lt;br /&gt;
&lt;br /&gt;
* You want to download all the GIFs from an HTTP directory. The command 'wget http://host/dir/*.gif '  doesn't work, since HTTP retrieval does not support globbing. In that case, use:&lt;br /&gt;
&lt;br /&gt;
: wget -r -l1 --no-parent -A.gif http://host/dir/&lt;br /&gt;
&lt;br /&gt;
It is a bit of a kludge, but it works perfectly. ' -r -l1 ' means to retrieve recursively, with maximum depth of 1. ' --no-parent ' means that references to the parent directory are ignored, and ' -A.gif ' means to download only the GIF files. ' -A &amp;quot; *.gif &amp;quot; ' would have worked too.&lt;br /&gt;
&lt;br /&gt;
* Suppose you were in the middle of downloading, when Wget was interrupted. Now you do not want to clobber the files already present. It would be:&lt;br /&gt;
&lt;br /&gt;
: wget -nc -r http://foo.bar.com/&lt;br /&gt;
&lt;br /&gt;
* If you want to encode your own username and password to HTTP or FTP, use the appropriate URL syntax:&lt;br /&gt;
&lt;br /&gt;
: wget ftp://name:password@foo.bar.com/myfile&lt;br /&gt;
&lt;br /&gt;
Special Usage&lt;br /&gt;
&lt;br /&gt;
* If you wish Wget to keep a mirror of a page (or FTP subdirectories), use ' --mirror ', which is the shorthand for ' -r -N '. You can put Wget in the crontab file asking it to recheck a site each Sunday:&lt;br /&gt;
&lt;br /&gt;
: 0 0 * * 0 wget --mirror ftp://x.y.z/pub -o /var/weeklog&lt;br /&gt;
&lt;br /&gt;
* You may wish to do the same with someone's home page. But you do not want to download all those images, you're only interested in HTML.&lt;br /&gt;
&lt;br /&gt;
: wget --mirror -A.html http://www.w3.org/&lt;br /&gt;
&lt;br /&gt;
More Information&lt;br /&gt;
&lt;br /&gt;
You find the sources of wget with all the documentation under the following links&lt;br /&gt;
&lt;br /&gt;
: http://www.gnu.org/software/wget/wget.html&lt;br /&gt;
: http://www.lns.cornell.edu/public/COMP/info/wget/wget_toc.html&lt;br /&gt;
: http://www.interlog.com/~tcharron/wgetwin.html&lt;br /&gt;
&lt;br /&gt;
== xmessage ==&lt;br /&gt;
&lt;br /&gt;
* You can use xmessage to put up temporary little notes to yourself, like PostIt notes, only from the commandline:&lt;br /&gt;
: xmessage &amp;quot;Your message here&amp;quot; &amp;amp;&lt;/div&gt;</summary>
		<author><name>wiki&gt;Igor</name></author>
		
	</entry>
</feed>