command called 'yes'
Code:
yes n | cp -i -r /foo
And every time cp pauses with a prompt it will be fed an 'n' + newline from yes
List 100 first files
ls -cr | head -n 100 (???)
ls -t | head -n 100
How to use RPM Commands
This section contains an overview of principal modes using with RPM for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. You must be familiar with these RPM commands now because we'll use them often in the continuation of this book. To install a RPM package, use the command:
[root@deep] /#rpm -ivh foo-1.0-2.i386.rpm |
To uninstall a RPM package, use the command:
[root@deep] /#rpm -e foo |
To upgrade a RPM package, use the command:
[root@deep] /#rpm -Uvh foo-1.0-2.i386.rpm |
To query a RPM package, use the command:
[root@deep] /#rpm -q foo |
To display package information, use the command:
[root@deep] /#rpm -qi foo |
To list files in package, use the command:
[root@deep] /#rpm -qlfoo |
To check a RPM signature package, use the command:
[root@deep] /#rpm --checksig foo |