我有很多rar档案在单个文件夹中构建,并希望脚本解压缩它们.
我无法弄清楚它应该如何完成并需要一些帮助.
#!/bin/bash
## For all inodes
for i in pwd; do
## If it's a directory
if [ -d "$i" ] then
cd $i
## Find ".rar" file
for [f in *.rar]; do
./bin/unrar x "$f" # Run unrar command on filename
cd ..
done
done
done
Run Code Online (Sandbox Code Playgroud)
我不熟悉bash脚本,我认为代码错误不止一次.但我想这应该是基本结构
扩展基类时,Java中的内存使用情况如何?
子类是否包含基类的实例(具有它自己的开销和所有)或它是否只有16字节的开销?
class Foo {
int x;
}
class Bar extends Foo {
int y;
}
Run Code Online (Sandbox Code Playgroud)
那么,更具体地说,Bar实例的内存使用量是多少?
是吗 Foo (including overhead) + Bar(including overhead)
要不就 Foo (excluding overhead + Bar(including overhead)