I am able to run the command /etc/passwd but how do I save it as a text file in my folder assessc, what would the path be as it is a users folder.
CodePudding user response:
You can do it with the following
cat /etc/passwd | sort >> /home/assessc/textfile
You need to replace the path with that of your folder
CodePudding user response:
Optimized version of the other answer:
sort -o /home/assessc/textfile /etc/passwd
no need to cat
and redirection