I am writing this document again (part 3) specially for linux newbies audience, even for intermediate users that might think a few of these tricks are useful for them.
Here goes 50 quick linux command tips and tricks part 3.
As root
1. How to have a stop watch scenario from command line terminal?
# time cat
Press Ctrl+C
2. How to measure the time of executing any executable command?
# time firefox
wait 5 seconds and close the application
3. How to CD to a user's home directory?
# cd ~userhome
4. How to CD back to home folder of a currently logged in user?
# cd
5. How to CD back to previous directory?
# cd -
6. How to show all active host IP address?
# ip address
7. How to list out all your iptables rules?
# iptables -L
8. How to save your currently loaded firewall iptable rules?
# iptables-save
9. How to download a file using wget?
# wget -c "http://website.com/file.rpm"
10. How to limit your download rate with wget?
# wget --limit-rate=30k "http://vertito.com/file.rpm"
11. How to download multiple files in one shot?
# wget -c "ftp://vertito.org/file[1-9].iso
12. How to find windows machine with shared folders?
# findsmb
13. How to look for windows netbios name?
# nmblookup -A windows-ip-address
14. How to browse for computers like network neighborhood does?
# smbtree
15. How list folder shared by a particular windows machine?
# smbclient -L windows-machine
16. How to diplay calendar without X?
# cal
# cal -3
17. How to list out all harddisk partition?
# cat /proc/partitions
# fdisk -l
18. How to list out all mounted and labeled harddisk partition?
# mount -l
19. How to show host reboot history?
# last reboot
20. How to get CPU info?
# cat /proc/cpuinfo
21. How to show all interrupts?
# cat /proc/interrupts
22. How to show last successful login users?
# lastlog
23. How to search for a yet unknown package from web repo?
# yum search *packagemaybe*
# yum whatprovides packagemaybe
24. How to setup a shell with yum?
# yum shell
25. How to use yum locally?
# yum localinstall packagename
26. How to find file with 750 file permission?
# find / -type f -perm 750
27. How to find all files not owned by any user?
# find / -nouser
28. How to find all files owned by a user?
# find /home -user vertito
29. How to find files by group name?
# find /home -group vertito
30. How to change timestamp of a file?
# touch -c -t 0707280337 testfile.txt
(YYMMDDhhmm)
31. How to change ownership of a file?
# chown user1:user1 testfile.txt
32. How to set user password details and expiration?
# chage username
33. How to change default home directory of a user?
# usermod -d /new-default-directory username
34. How to change a user finger information?
# chfn username
35. How to change a user shell information?
# chsh username
36. How to change file mode bits?
# chmod testfile.txt
37. How to change and update (multiple) user passwords in batch mode?
# chpasswd
38. How to make an ISO image from contents of a directory?
# mkisofs -V label-name -r directory-name > iso-image.iso
39. How to make an ISO image from contents of a directory and zip it in one shot?
# mkisofs -V label-name -r directory-name | gzip > iso-image.iso.gz
40. Oh, how to eject a DVD/CD disk from a mounted DVD/CD drive?
# eject
41. How to clear or erase all data from a mounted DVDRW / CDRW disk?
# cdrecord -v dev=/dev/cdrom blank=fast
42. How to add an ext3 journal to a filesystem ?
# tune2fs -j /dev/sdb1
43. How to create ext2/ext3 filesystem with bad block checking?
# mkfs.ext3 -c /dev/sdb1
# mkfs.ext2 -c /dev/sdb1
44. How to combine and sort multiple raw files in one shot?
# sort file1 file2 | uniq > newfile
45. How to compare two text files?
# diff file1 file2
46. How to get more memory information?
# cat /proc/meminfo
47. How to get the maximum number of threads of your host?
# cat /proc/sys/kernel/threads-max
48. How to get the file properties of a file or folder?
# stat testfile.txt
# stat foldername
49. How to backup harddisk to another host via ssh?
# dd bs=1M if=/dev/sda | gzip | ssh username@remote-ip-address 'dd of=hda.gz'
50. How to run a command as another user?
# runuser another-user script-name-or-program
That's all.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
July
(107)
- AMSN messenger install howto
- firefox browser - yum update howto
- kopete messenger install howto
- Gaim pidgin messenger install howto
- xmms - multimedia player install howto
- UltraDMA - speedup your harddisk howto
- sabayon - user profile manager howto
- 50 quick linux command tips part 3
- No negotiations with Microsoft in progress
- connect SamSung D820 mobile to linux howto
- yum from ISO image or CD install howto
- missing portmap reinstall howto
- 50 quick linux command tips part 2
- 50 quick linux command tips part 1
- desktop wiki install howto
- NASA tests Linux for spacecraft control
- warzone 2100 strategy 3d game install howto
- motd - message of the day
- more with kernel name version howto
- stop and start networking service howto
- change network proxy preference howto
- alexa firefox toolbar plugin install howto
- reboot / halt system via CLI howto
- gparted partitioning install howto
- google picasa install howto
- pine and pico install howto
- adobe/macromedia flash player test and install howto
- realplayer install howto
- Microsoft's TrueType core fonts install howto
- Why Choose Fedora? (Fedora vs. Ubuntu)
- Microsoft vs Opensource
- the df command
- linux possessed by monsterz
- change display setting howto
- NTP clock synchronization howto
- qtparted partitioning magic install howto
- host name and host aliases explained
- IP aliasing - virtual IP howto
- viruskiller on linux
- change keyboard language setting
- changing ethernet card settings howto
- TIP: WiFi with chillispot and linux
- play tennis the linux way
- sudoku game install howto
- my linux box talked to me
- CD/DVD burning software install howto
- A SYSAD BLOG - LINUX: list out active host connect...
- list out active host connection howto
- more with linux command named history
- GnuPG and enigmail thunderbird add-ons
- PDF file readers install howto
- digikam - KDE photo management install howto
- gnome floppy formatter
- f-spot Gnome photo manager install howto
- VLC media player install howto
- ping IP subnet block howto
- TIP: find and delete files recursively
- list out opened host ports howto
- TIP: linux process priority scheduling management
- TIP: spammer sending email using squid
- remount partition as read only howto
- additional swap file howto
- CrossOver install howto
- system-config-securitylevel-tui and lokkit howto
- format a windows partition from linux hadrdisk
- TIP: monitoring while mounting USB devices
- zero-sized a file without permission / ownership c...
- TIP: auto create mail spool when adding user
- md5sum checksum howto
- IP address to country lookup howto
- gnome mail notification install howto
- add new harddisk to existing linux system
- TIP: block an IP address
- disk space report
- more trace route command alternatives
- changing your hardware / software clock howto
- other interesting ping commands
- send email via CLI howto
- adding static route howto
- send message to all logged in users
- unzip zip untar tar bzip2 bunzip2 gzip gunzip file...
- format of /etc/passwd, /etc/shadow and /etc/group
- remove user's cron jobs howto
- find the user's files howto
- passphraseless + passwordless ssh howto
- passwordless ssh howto
- X11 Forwarding via ssh howto
- skype install howto
- disable IPv6
- lsusb - list all USB devices
- make yum faster
- lspci - list all PCI devices
- kill a process
- beginners CLI guide for static ip address
- the pidof command
- retrieve data from mysql using bash script
- VirtualBox install howto
- call bash script inside php web page
- alternative linux browsers
- last / currently logged in users
-
▼
July
(107)
Saturday, July 28, 2007
50 quick linux command tips part 3
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment