··· function setHeight(el, val) { if (typeof val === “function”) val = val(); if (typeof val === “string”) el.style.height = val; else el.style.height = val + “px”; }
setHeight(el, val); ···
function ready(fn) { if (document.readyState != ‘loading’){ fn(); } else { document.addEventListener(‘DOMContentLoaded’, fn); } }
for i in {1..14} do # echo $i # echo 'map_'$i'*.png'
# find . -maxdepth 1 -regex '.*map_'$i'.*'
# find . -name 'map_'$i'*.png'
echo map_$i-*.png mv map_$i-*.png 222 done
ls only folder
ls -d */
/ is a pattern that matches all of the subdirectories in the current directory ( would match all files and subdirectories; the / restricts it to directories). Similarly, to list all subdirectories under /home/alice/Documents, use ls -d /home/alice/Documents/*/
查找系统中所有文件长度为0的普通文件,并列出它们的完整路径
find / -type f -size 0 -exec ls -l {} ;
vi .bash_profile
alias lf=”ls -l | egrep -v ‘^d’” alias ldir=’ls -d */‘
Type of copy the following into Terminal: sudo rm -R (there needs to be a space after the R) But don’t press enter. Now Control-click on your Trash icon to open it. Select the files in your trash. Drag them to the Terminal window. Now press Enter Enter your administrator password (it won’t show up) Hit Enter