Let's find all HTML files:
Extended Eg
Let's ensure that all our html files use HTML5Commands
ls
- The command
ls
lists the files in a directory. - The command is documented in the manual
$ man ls
q
to quit the manual).Options
Most commands take options. For example:-a, --all
do not ignore entries starting with .-1
list one file per line. Avoid '' with -q or -b
Piping
Piping using the|
allows combining commands.$ rpm -qa
$ rpm -qa | grep -i "Acrobat"
searches the list to see if the Acrobat PDF reader is installed.Note: the try with acrobat doesnt work because I do not have install any PDF since I'm just using an emulator (Virtual Machine) and I have not install anything on it.
Complex Eg
How do you list all the software licences of packages installed on your system?$ rpm -qa --qf "%{license}\n" | sort | uniq
Filesystem
Try
$ cd ~
$ ls
$ ls -a
$ cd Documents
-a
option for ls
do?-a includes the files, since ls only include carpets
Conclusion
- There are many Linux commands.
- Each command has options.
- Some commands take other parameters.
- Commands can be combined quickly to give impressive functionality.
- The filesystem makes more sense than the Windows structure!
- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Comments
Post a Comment