Check if a linux binary is 32-bit or 64 bit
Use command file
1 2 |
[yli@mypc xulrunner]$ file xulrunner-bin xulrunner-bin: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped |
Remove the added files after unshelving in Perforce
1 |
p4 sync 2>&1 | grep --line-buffered "writable file" | cut -d ' ' -f 5 | xargs -L1 rm |
Use find with filters
Filters are options of “-not -path“, “-not -name“.
1 |
find ./ -type f -not -path "*/test/*" -not -name "*Test.cc" \( -name "*.cpp" -o -name "*.cc" -o -name "*.c" \) |
Check if a XML file is well formed
1 2 |
xmllint --noout good.xml echo $? |
Top (filtered by java)
1 |
top -p `pgrep -d ',' java` |