Sometimes it is required to use more than one command in a line or simultaneously. For example:-
If you are using find command and result has a large number of files you can use grep command to search your desired file.
Let"s say we want to find .html files on our system. So we use
# find / -name *.html
It may show you hundreds of file flashing past you on your terminal screen. An alternative is
# find / -name *.html | grep bookmark
This command searches through result for text string "bookmark". Only those files with both strings are outpuut to the screen.
Similarly we can have
# who" grep mj
# ps aux " grep mozilla
The first command who, lists all users currently logged on Linux system. when you pipe(") the result to the grep mj command, you"ll find no. of times that user mj is currently logged on the system.
The second command, ps , lists the process currently running on Linux system. Three switches, aux(a dash is not required ps command switches) , leads very long lists of processes run by all users (a), each associated with username(u) , independent of virtual terminal(x). you need grep to search through these processes. This combined command returns all processes with the word mozilla.
Related Posts:-
Blogroll
Glossary
Installing Linux On a Server
- Installing and configuring Vmware2 to Run Linux (R...
- Installing Linux in a Server Configuration
- Performing Preinstallation Evaluation
- Linux System Administrator
- Installing and Configuring Servers
- Installing and Configuring Application Software
- Creating and Maintaining User Accounts
- Backing Up and Restoring Files
- Monitoring and Tuning Performance
- Configuring a Secure System
- Using Tools to Monitor Security
- Server Design
- Uptime
- Dual-Booting Issues
- Methods of Installation
- Determining a Server’s Functions
- Using the Red Hat Package Manager
- Initialization Scripts
Network Configuration
Filesystem Primer
- Understanding Filesystem Hierarchy Standard
- Basic Linux Directory Structure
- Partition Schemes
- Managing Partitions
- Managing partitions with fdisk
- Adding A New Hard Drive
- Basic Linux Formats
- Formatting a partition
- Tuning
- Troubleshooting With FSCK
- Exploring Logical Volume Management
- File Permissions 1
- File Permissions 2
- umask
- Concept of the i-Nodes and Superblocks in Linux/Un...
- Understanding ext3 file system and its advantages
Administering Users and Groups Securely
Network File System
Comments
Install Softwares
- Install Vuze(Azureus) Bittorent client on Linux 64..
- Install Skype(pc2pc calling software) On Linux 64 ...
- Install WEBMIN to Graphically Administer Your Linu...
- Opening And Extracting .rar Files in Linux/Unix sy...
- Installing vlc player in Fedora/Red Hat/ CentOS
- Linux text to speech festival
- Installing Thunderbird E-mail client
Post a Comment