Working on my 'elder' iMac (High Sierra) I noticed that a directory I have been working in shows me files that are there. But in Terminal, viewing the same directory, I see files that should have been just deleted. The directory I'm working in is where I am converting .flac files to .mp3 with ffmpeg via a Perl script. Once converted, I delete the files via the Perl script. So why is there a difference between what Finder shows me and what Terminal shows me?

Results of ls -l /Volumes

~/Desktop/Colourbox - Disc 4 (2012) [user] ls -l /Volumes
total 8
drwxrwxr-x  25 user  admin   918 Jul 31 11:24 Backup3
lrwxr-xr-x   1 root  wheel     1 Sep  8 10:14 Macintosh HD -> /
drwxrwxr-x  13 root  wheel   510 Sep  8 11:16 Nano
drwxrwxrwx  33 user  wheel  1360 Sep  3 18:00 echo1
drwxrwxr-x+ 18 root  wheel   952 Jun 27 09:07 femto
drwxrwxr-x   9 user  wheel   544 Jul 30 17:02 ssd1
2021-09-08 11:43:44
~/Desktop/Colourbox - Disc 4 (2012) [user] 

Screen shots: Image of ls

Image of Finder

Relevant code is a couple of subroutines in a large script so will have to pull out only the code applicable.

  • 3
    Have you considered the possibility that you’re actually looking at two different directories? What does pwd tell you? What path do you see when you drag the folder from Finder into a Terminal window?
    – pion
    Sep 7 at 19:09
  • Yes, that was something I considered as it would be easy to do. I have double-checked and mailed screenshots to several friends including the path. None came back with that consideration.
    – Trudge
    Sep 8 at 10:37
  • Can you share your screenshots? Along with the script.
    – pion
    Sep 8 at 14:04
  • /Users/user/Desktop/Screen Shot 2021-09-06 at 6.50.55 PM.png /Users/user/Desktop/Screen Shot 2021-09-06 at 6.50.32 PM.png Not sure if these 2 images were included.
    – Trudge
    Sep 8 at 15:00
  • You need to edit your question and add the images there
    – pion
    Sep 8 at 15:13

It may be that my eyes are playing tricks on me, but it almost looks like in Finder you've navigated into a subdirectory of M-Sol Project whereas in Terminal you've navigated to a subdirectory of M–Sol Project. If these look identical to you, it's because I used an en dash (-) in the former and an em dash (Option-) in the latter. One is very slightly wider than the other, but they are two distinct characters and would result in two different folder paths.

Can you navigate to /Volumes/ssd1/httpd/public/local/music/data/ and see what ls -l gives you?

  • If that turns out to be true, what a good eye!
    – lhf
    Sep 8 at 21:39
  • Wow that catches me more often than anything else. I try to use copy-paste to avoid that, and do the encoding along the way. Thank you very much for catching that and pointing it out eh!
    – Trudge
    Sep 9 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .