HOW TO REDIRECT THE OUTPUT OF A DIRECTORY INTO A FILE
The command is as:-
Command :- ls -al /var/log >test1.log
In the above example, we are listing the files of the directory/var/log into a file named test1.log
We can check the contents of the test1.log by the command:- cat test1.log
No comments:
Post a Comment