In: Computer Science
Display and store a long listing of all the regular files and directories in /personal_files. Store the output in a file called mypersonalfiles. UNIX
Please let me know if anything is required
ls -l is used for long listing the all type of files and directories in /personal_files
grep '^[-d] , in long list the first character of the list describes the type of file, so '-' means that it's a regular file, and 'd' means directory, so the grep command search for the lines which are starting with '-' or 'd'
> mypersonalfiles means creating the file and giving the output of the command to the file as input
so the complete command is : ls -l | grep '^[-d]' > mypersonalfiles