>" like this: #ls >> file_list.txt Standard Input #sort < file_list.txt #sort < file_list.txt > sorted_file_list.txt"> >" like this: #ls >> file_list.txt Standard Input #sort < file_list.txt #sort < file_list.txt > sorted_file_list.txt">
Download presentation
Presentation is loading. Please wait.
1
Presented by, Mr. Satish Pise
Experiment No. 6 Presented by, Mr. Satish Pise
2
I/O Redirections and Pipes
Standard Output # ls > file_list.txt If you want the new results to be appended to the file instead, use ">>" like this: #ls >> file_list.txt Standard Input #sort < file_list.txt #sort < file_list.txt > sorted_file_list.txt
3
Pipes (|) I/O redirection is to connect multiple commands together with what are called pipes(|). #ls -l | less #ls -lt | head Displays the 10 newest files in the current directory. #du| sort –nr Displays a list of directories and how much space they consume, sorted from the largest to the smallest. #find . -type f -print | wc-l Displays the total number of files in the current working directory and all of its subdirectories.
4
Exemples In this example we are sorting the listing of a directory so that all the directories are listed first. #ls -l /etc | tail -n +2 | sort n this example we will feed the output of a program into the program less so that we can view it easier. #ls -l /etc | less
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.