| • | alias hd='od -Ax -tx1z -v' | Handy hexdump. (usage e.g.: • hd /proc/self/cmdline | less) |
| • | alias realpath='readlink -f' | Canonicalize path. (usage e.g.: • realpath ~/../$USER) |
| • | set | grep $USER | Search current envirenement |
| touch -c -t 0304050607 file | Set file timestamp (YYMMDDhhmm) | |
| • | python -m SimpleHTTPServer | Serve current directory tree at http://$HOSTNAME:8000/ |
Linux Install/Commands Quick Search Engine :
Custom Search
NB:
You can Find ALL (Downloads,meaning,more posts)Quickly and easily With This Search engine.
*For Meaning Use : Meaning of 'WORD' .
*For Downloads Use : Download ' Product'
*For More Posts About A Subjet Use : Posts About 'WORD/SENTENSE')
*For Meaning Use : Meaning of 'WORD' .
*For Downloads Use : Download ' Product'
*For More Posts About A Subjet Use : Posts About 'WORD/SENTENSE')
Wednesday, April 29, 2009
Linux Commands miscellaneous
Linux Commands system information
| • | uname -a | Show kernel version and system architecture |
| • | head -n1 /etc/issue | Show name and version of distribution |
| • | cat /proc/partitions | Show all partitions registered on the system |
| • | grep MemTotal /proc/meminfo | Show RAM total seen by the system |
| • | grep "model name" /proc/cpuinfo | Show CPU(s) info |
| • | lspci -tv | Show PCI info |
| • | lsusb -tv | Show USB info |
| • | mount | column -t | List mounted filesystems on the system (and align output) |
| • | grep -F capacity: /proc/acpi/battery/BAT0/info | Show state of cells in laptop battery |
| # | dmidecode -q | less | Display SMBIOS/DMI information |
| # | smartctl -A /dev/sda | grep Power_On_Hours | How long has this disk (system) been powered on in total |
| # | hdparm -i /dev/sda | Show info about disk sda |
| # | hdparm -tT /dev/sda | Do a read speed test on disk sda |
| # | badblocks -s /dev/sda | Test for unreadable blocks on disk sda |
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Linux Commands interactive
• readline Line editor used by bash, python, bc, gnuplot, ...
• screen Virtual terminals with detach capability, ...
• mc Powerful file manager that can browse rpm, tar, ftp, ssh, ...
• gnuplot Interactive/scriptable graphing
• links Web browser
• xdg-open http://www.website.xxx/ open a file or url with the registered desktop application
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
• screen Virtual terminals with detach capability, ...
• mc Powerful file manager that can browse rpm, tar, ftp, ssh, ...
• gnuplot Interactive/scriptable graphing
• links Web browser
• xdg-open http://www.website.xxx/ open a file or url with the registered desktop application
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Linux Commands monitoring/debugging
| • | tail -f /var/log/messages | Monitor Messages in a log file |
| • | strace -c ls >/dev/null | Summarise/profile system calls made by command |
| • | strace -f -e open ls >/dev/null | List system calls made by command |
| • | ltrace -f -e getenv ls >/dev/null | List library calls made by command |
| • | lsof -p $$ | List paths that process id has open |
| • | lsof ~ | List processes that have specified path open |
| • | tcpdump not port 22 | Show network traffic except ssh. |
| • | ps -e -o pid,args --forest | List processes in a hierarchy |
| • | ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d' | List processes by % cpu usage |
| • | ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS | List processes by mem usage. |
| • | ps -C firefox-bin -L -o pid,tid,pcpu,state | List all threads for a particular process |
| • | ps -p 1,2 | List info for particular process IDs |
| • | last reboot | Show system reboot history |
| • | free -m | Show amount of (remaining) RAM (-m displays in MB) |
| • | watch -n.1 'cat /proc/interrupts' | Watch changeable data continuously |
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Linux Commands disk space
| • | ls -lSr | Show files by size, biggest last |
| • | du -s * | sort -k1,1rn | head | Show top disk users in current dir. |
| • | df -h | Show free space on mounted filesystems |
| • | df -i | Show free inodes on mounted filesystems |
| • | fdisk -l | Show disks partitions sizes and types (run as root) |
| • | rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n | List all packages by installed size (Bytes) on rpm distros |
| • | dpkg -query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n | List all packages by installed size (KBytes) on deb distros |
| • | dd bs=1 seek=2TB if=/dev/null of=ext3.test | Create a large test file (taking no space). |
| • | > file | truncate data of file or create an empty file |
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Linux Commands CDs
| gzip < /dev/cdrom > cdrom.iso.gz | Save copy of data cdrom | |
| mkisofs -V LABEL -r dir | gzip > cdrom.iso.gz | Create cdrom image from contents of dir | |
| mount -o loop cdrom.iso /mnt/dir | Mount the cdrom image at /mnt/dir (read only) | |
| cdrecord -v dev=/dev/cdrom blank=fast | Clear a CDRW | |
| gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom - | Burn cdrom image (use dev=ATAPI -scanbus to confirm dev) | |
| cdparanoia -B | Rip audio tracks from CD to wav files in current dir | |
| cdrecord -v dev=/dev/cdrom -audio *.wav | Make audio CD from all wavs in current dir (see also cdrdao) | |
| oggenc --tracknum='track' track.cdda.wav -o 'track.ogg' | Make ogg file from wav file |
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Linux Commands recode (Obsoletes iconv, dos2unix, unix2dos)
| • | recode -l | less | Show available conversions (aliases on each line) |
| recode windows-1252.. file_to_change.txt | Windows "ansi" to local charset (auto does CRLF conversion) | |
| recode utf-8/CRLF.. file_to_change.txt | Windows utf8 to local charset | |
| recode iso-8859-15..utf8 file_to_change.txt | Latin9 (western europe) to utf8 | |
| recode ../b64 <> file.b64 | Base64 encode | |
| recode /qp.. <> file.qp | Quoted printable decode | |
| recode ..HTML <> file.html | Text to HTML | |
| • | recode -lf windows-1252 | grep euro | |
| • | echo -n 0x80 | recode latin-9/x1..dump | Show what a code represents in latin-9 charmap |
| • | echo -n 0x20AC | recode ucs-2/x2..latin-9/x | Show latin-9 encoding |
| • | echo -n 0x20AC | recode ucs-2/x2..utf-8/x | Show utf-8 encoding |
YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE INFORMATIONS DOWNLOADS OR DETAILS.
Subscribe to:
Posts (Atom)