Showing posts with label notes笔记. Show all posts
Showing posts with label notes笔记. Show all posts
2014-11-18
Shell Script to get last month date
Source URL: http://www.unix.com/unix-for-dummies-questions-and-answers/99281-how-get-previous-month-using-date.html
j=`date +"%m"`; echo $j; i=`expr $j - 1`; echo $i;
Output:
11
10
enhance:
j=`date +"%m"`; echo $j; i=`expr $j - 1`; echo $i; echo `date +"%Y$i%d_%p%H%M"`
Output:
11
10
20141018_AM0340
gzip status progress shell script with Pipe Viewer
Pipe Viewer Source URL: http://www.ivarch.com/programs/pv.shtml
If you don't have Pipe Viewer Current version: 1.5.7:
| CentOS / RHEL: | Set up my YUM repository or use RepoForge, then do "yum install pv". |
|---|
Source URL 1 of 2:
http://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script
$ bar file1 | wc -l
$ pv file1 | wc -l
$ tail -n 100 file1 | bar | wc -l
$ tail -n 100 file1 | pv | wc -l
$ copy <(bar file1) file2
$ copy <(pv file1) file2
bar --in-file /dev/rmt/1cbn --out-file \
tape-restore.tar --size 2.4g --buffer-size 64k
Source URL 2 of 2:
http://stackoverflow.com/questions/19598797/is-there-any-way-to-show-progress-on-a-gunzip-database-sql-gz-mysql-pr
$ pv database1.sql.gz | gunzip | mysql -u root -p database1
$ pv database1.sql.gz | gunzip | mysql -uroot -p database1
593MiB 1:00:33 [ 225kiB/s] [====================> ] 58% ETA 0:42:25
mysqldump -uroot -p database1 | pv | gzip -9 > database1.sql.gz
Tag:
computer电脑,
forward转,
linux,
notes笔记,
Shell Script
Create recursively folders using shell script
Source URL: http://stackoverflow.com/questions/8274920/is-it-possible-create-recursively-folders-using-shell-script
mkdir -p folder1/folder2/folder3
Tag:
computer电脑,
forward转,
linux,
notes笔记,
Shell Script
2009-06-23
Synchronized在java的用法
2009-05-12 13:41
Java 对多线程的支持与同步机制深受大家的喜爱,似乎看起来使用了synchronized关键字就可以轻松地解决多线程共享数据同步问题。 到底如何?――还得对synchronized关键字的作用进行深入了解才可定论。 总的说来,synchronized关键字可以作为函数的修饰符,也可作为函数内的语句,也就是平时说的同步方法和同步语句块。 如果再细的分类,synchronized可作用于
还有一些技巧可以让我们对共享资源的同步访问更加安全:
|
2008-06-12
为什么要知道栈与堆的机制?
问:到底为什么要知道栈(stack)与堆(heap)的机制?
这真的与我有关系吗?
答:
这真的与我有关系吗?
答:
- 如果想要了解变量的有效范围(sope)、对象的建立、内存管理、线程(thread) 和异常处理,则认识栈与堆是很重要的。
- 后面的章节会讨论到有关线程与异常处理的部分,其余的都会在这一章讨论。
- 你无需知道它们是如何实现的,只是能够理解这几页的内容就足够了。
2008-01-22
load data into CrystalReport by generated TableAdapter.Fill() DataTable
Dim c As DataTable = Me.dsNorthwind.Customers
Me.taCustomers.Fill(c)
Me.crtAllCustomer.SetDataSource(c)
Me.crvCustomers.ReportSource = Me.crtAllCustomer
Me.crvCustomers.DisplayGroupTree = False
Me.crvCustomers.Zoom(70)
Me.taCustomers.Fill(c)
Me.crtAllCustomer.SetDataSource(c)
Me.crvCustomers.ReportSource = Me.crtAllCustomer
Me.crvCustomers.DisplayGroupTree = False
Me.crvCustomers.Zoom(70)
Subscribe to:
Posts (Atom)