| Summary: | the ls command does not work correctly | ||
|---|---|---|---|
| Product: | Base System | Reporter: | wildzander |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Open --- | ||
| Severity: | Affects Many People | CC: | lwhsu, salvadore, xxjack12xx |
| Priority: | --- | ||
| Version: | 14.0-RELEASE | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
wildzander
2023-11-27 07:41:31 UTC
The default for ls running as root is ls -A The default for ls running as a user doesn't use -A Thank you for your report. The behavior of the ls command you're observing seems normal. The root user's directory (/root) contains files, so ls lists them. In contrast, the regular user's directory (/home/test) is very possible to be empty, which is why ls shows no output there. This is expected when a directory has no files. Please check to use the ls with different users to list the same directory, and report if it outputs differently. Thank you for your answers. The /home/test/ directory is not empty !. It contains several different files and subdirectories. That's why the ls command seems to work wrong. (In reply to wildzander from comment #3) As comment #1 pointed out, can you try with `ls -A` as a normal user? Also, can you check using root to list what's in /home/test ? Thank you. I'll give it a try when I'm on the computer. I'll post the results then. I had a similar issue due to my expectations of /home being a symlink to /usr/home (or viceversa, I never remember) and thus I made some mistakes mounting zfs filesystems. Try "ls /usr/home/test", I think you will find your files there. Then try to fix your mountpoints or create the right symlink. Regards. The ls -A command works well. test@fbsd:~ $ ls -A total 33 drwx------ 3 test test 3 27 lis 17:46 .cache drwx------ 3 test test 3 27 lis 17:46 .config -rw-r--r-- 1 test test 950 26 lis 09:47 .cshrc drwx------ 3 test test 3 27 lis 17:46 .local -rw-r--r-- 1 test test 311 26 lis 09:47 .login -rw-r--r-- 1 test test 79 26 lis 09:47 .login_conf -rw------- 1 test test 289 26 lis 09:47 .mail_aliases -rw-r--r-- 1 test test 255 26 lis 09:47 .mailrc -rw-r--r-- 1 test test 966 26 lis 09:47 .profile -rw------- 1 test test 133 26 lis 13:28 .sh_history -rw-r--r-- 1 test test 1003 26 lis 09:47 .shrc test@fbsd:~ $ I don't understand why the output of ls -A is "total 0"? Either there should be no output (as with the ls command) or the output should be correct, but in any case the output should not be nonsensical. This can be incomprehensible and confusing for a user coming from Linux. It might be a good idea to set the ls command to ls -A for the user, just as it is set for the superuser. Can I have one off-topic question? I'm from the Czech Republic and I use the cz.kbd keyboard map with freebsd. This keyboard map doesn't suit me very well, so I decided to create another Czech keyboard map. When this keyboard map is ready, where and to whom can I send it so that it can be integrated into freebsd and used by others? Thank you and have a nice day. (In reply to wildzander from comment #7) I spelled it wrong. It should have been" I don't understand why the output of ls -l is 0 in total? etc...... |