My code
echo $ls | /var/lib/judgem/records/
I'm trying to get the script to show me all the files inside the folder "records"
How do I do that?
Or, if you want to list the contents of another directory without the full path, i.e. as though you were in the other directory, but without ending up there after the command has finished, you can use a subshell like this:
(cd /var/lib/judgem/records/ && ls)
You will notice you stay in whatever directory you were in but the files are listed without the full path of /var/lib/judgem/records on the front.
Give the directory as the argument to ls
:
ls /var/lib/judgem/records
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With