List all files mac os

Как вывести список всех файлов и содержимого подкаталогов в папке на Mac 2021

unboxing turtles slime surprise toys learn colors

  • unboxing turtles slime surprise toys learn colors

    Вы когда-нибудь хотели видеть не только каждый файл в данном каталоге, но и все файлы в этих каталогах, скрытые подкаталоги? Если вы ищете рекурсивный список файлов в данной папке, мы покажем отличный трюк для Mac OS Finder, который позволяет вам это сделать, а также продемонстрируем несколько более сложных подходов с использованием командной строки.,

    Как развернуть все подкаталоги и список содержимого папок в Mac OS Finder

    Чтобы быстро увидеть, что находится во всех подкаталогах папки в Finder, откройте родительскую папку и перейдите в вид списка. Теперь вам нужно удерживать клавишу Option и щелкнуть маленькую стрелку рядом с именем каталога, чтобы развернуть этот каталог и все подкаталоги одновременно.

    В результате каждая подпапка, содержащаяся в каталоге, на котором вы щелкнули стрелку, опционально покажет ее содержимое:

    Повторное нажатие этой стрелки на этой опции приведет к закрытию всех подкаталогов, в противном случае это становится новым видом по умолчанию при нажатии на стрелку.

    Имейте в виду, что если вы хотите просматривать скрытые файлы с помощью этого метода, вы должны включить отображение скрытых файлов в Mac OS X Finder по отдельности, что затем будет проходить через каждую папку, пока она снова не будет отключена.

    Вышеупомянутый подход будет самым простым методом для большинства пользователей, и следующие два метода ориентированы на командную строку и предназначены для тех, кто удобен в Терминале.

    Вывести список всех файлов и содержимого подкаталогов из командной строки

    Чтобы рекурсивно вывести список всех файлов из командной строки, вы можете прикрепить флаг -R к традиционной команде ls. Это расширяет подкаталоги и перечисляет файлы, содержащиеся в них. Эти команды будут работать практически во всех формах Unix, от Mac OS X до Linux или любых других, с которыми вы можете столкнуться.

    Пример вывода будет выглядеть примерно так:

    /Users/macuser/Desktop//wallpapers:
    Dark Tower.jpg milky-way.jpg
    car.jpg ngc602.jpg
    flaming-star-nebula.jpg ngc6188Kfir2000.jpg
    windows.jpg m33.jpg
    /Users/macuser/Desktop//trip:
    volcano.jpeg itenerary.txt tickets.JPG

    Вывод приличный, но может быть лучше устроен.

    Использование флагов -lah в дополнение к -R покажет права доступа, владельца, даты изменения, и это значительно упростит чтение информации о файле. Флаг -a является необязательным, что позволяет отображать скрытые файлы.

    Пример вывода будет выглядеть так:

    /Users/macuser/Desktop/wallpapers:
    total 5464
    [email protected] 11 macuser staff 374B Jan 14 15:32 .
    drwxr-xr-x 522 macuser staff 17K Jan 28 10:20 ..
    [email protected] 1 macuser staff 254K Jan 13 15:44 Dark Tower.jpg
    [email protected] 1 macuser staff 101K Jan 14 15:32 cars.jpg
    [email protected] 1 macuser staff 141K Jan 13 15:44 star-nebula.jpg
    [email protected] 1 macuser staff 206K Jan 14 09:57 nintendo.jpg
    [email protected] 1 macuser staff 134K Jan 13 15:44 m33.jpg
    [email protected] 1 macuser staff 1.4M Jan 13 15:30 milky-way.jpg
    [email protected] 1 macuser staff 153K Jan 13 15:44 ngc602.jpg
    [email protected] 1 macuser staff 194K Jan 13 15:44 windows.jpg
    /Users/macuser/Desktop/trip:
    total 360
    [email protected] 6 macuser staff 204B Dec 9 13:43 .
    drwxr-xr-x 522 macuser staff 17K Jan 22 10:20 ..
    [email protected] 1 macuser staff 6.0K Dec 9 13:43 .DS_Store
    [email protected] 1 macuser staff 30K Dec 8 12:41 volcano.jpeg
    [email protected] 1 macuser staff 45K Dec 8 12:41 itinerary.txt
    [email protected] 1 macuser staff 88K Dec 9 12:31 tickets.JPG

    Вы заметите, что путь к каждому файлу указан над самими файлами, расширяя подкаталоги так же, как метод Finder, упомянутый выше. Вы можете получить путь для продолжения имени файла, используя полностью другую команду.

    Список всех файлов рекурсивно с указанием полного пути к каталогу

    Наконец, если вы хотите получить список всех файлов с указанием их полных путей, вы можете обратиться к команде поиска.

    Читайте также:  Windows start system process

    /Desktop/Sample/ -type f

    Это выведет полный путь к каждому файлу в листинге:

    /Users/macuser/Desktop/Sample/x11.jpg
    /Users/macuser/Desktop/Sample/Files/alpha-tool-preview.jpg
    /Users/macuser/Desktop/Sample/Files/alpha-tool.jpg
    /Users/macuser/Desktop/Sample/Files/reveal-editing-tools-preview.jpg
    /Users/macuser/Desktop/Sample/Files/save-transparent-png.jpg

    Если вы хотите поделиться списком каталогов с кем-то, команда find, вероятно, даст превосходные результаты. В таком случае вы можете легко вывести вывод в файл, прикрепив> к концу следующим образом:

    find /Path/To/List -type f > FilesWithPaths.txt

    Флаг «-type f» обозначает только обычные файлы, если вы хотите показать больше объектов или символических ссылок, вы можете проверить страницу справки для поиска дополнительной информации.

    Источник

    Mac OS X: Print or Save a List of File Names

    There are a couple of good ways to print or save a list of a folder’s contents, depending on what result you’re looking for. We’re going to be using the TextEdit program for this, which is a nifty little word processor that comes by default on your Mac. It’s in your Applications folder.

    So open that and get a new document started. You’ll want to make sure that you’re using a plain-text document and not a rich-text one, which you can toggle under the Format menu or by hitting Shift-Command-T .

    The first way to start your list is to select the files you want in it and drag them into that TextEdit document.

    If you’ve ignored my rich-text/plain-text advice above, you may get a bunch of pasted graphics (or what have you). Never ignore my advice, you silly thing.

    If you see the formatting toolbar pointed out above, your TextEdit document is set to rich text.

    If, however, you’ve done as I suggested, you’ll get a neatly formatted list of files, complete with the folder path that contains each of them.

    What if you don’t like the paths, though? What if a file path traumatized you when you were a child? It’s lucky that there’s an easy way around that, then. Select the files again, and instead of dragging them, hit Command-C (or choose Edit > Copy ), then go back to your TextEdit document and hit Command-V (or choose Edit > Paste ). Holy crap, it’s a list of just the file names without the paths.

    Easy, huh? Now you can print a list of your files without having to resort to third-party programs, screenshots, Terminal, or Automator. Or banging your head against a wall, either. That rarely does anyone any good.

    Источник

    Show Download History List of All Files Ever Downloaded Within Mac OS X

    Have you ever wanted to show a list of the entire download history of a Mac? Maybe you know you downloaded a file but you can’t quite pinpoint where you got it from and the “Get Info” trick didn’t work. Or maybe you are trying to track down a file that has been placed on a system that led to problems. Whether it’s for troubleshooting, personal interest, or forensics, the following command will show you everything that you’ve downloaded to a Mac regardless of the application that it came from:

    How to View a List of All Files Downloaded to a Mac

    This works by querying the file quarantine database of OS X, which is aimed at protecting Macs from malicious downloads. You’ll use the Terminal application and sqlite for this purpose.

      Launch Terminal from /Applications/Utilities/ and enter the following command into a single line:

    /Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* ‘select LSQuarantineDataURLString from LSQuarantineEvent’

  • Hit return to see the list of downloaded files
  • Depending on how old the Mac is and how much stuff you’ve downloaded, it can take a while to query the database and dump the results. You may want to pipe the results through “sort” to group the downloaded list into similar items or sources, that would look like this:

    /Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* ‘select LSQuarantineDataURLString from LSQuarantineEvent’ | sort

    For ease of viewing, you can also redirect the output into a text file, this command will dump the list into a file called “QuarantineEventList.txt” on the active users desktop:

    /Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* ‘select LSQuarantineDataURLString from LSQuarantineEvent’ >

    The output lists everything that has been passed through the Quarantine Manager, which for the last several versions of Mac OS X is quite literally every item downloaded to the Mac, regardless of the application it came from. Generally, the older the Mac is and the more files have been downloaded, the larger the list, and the longer the query can take to run.

    This list even works if you have file quarantine turned off for files and apps, thanks to inket for verifying that.

    Deleting the Download History List

    For those who would rather not have an all-inclusive historical list of downloaded files, you can run the following command to delete the contents of the quarantine database:

    Читайте также:  Asio4all windows 10 настройка

    /Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* ‘delete from LSQuarantineEvent’

    You can run that individually, or place it into .bash_profile or .profile to clear the database automatically when a new terminal window is launched.

    This has been tested and continues to work in many versions of Mac OS X, from earlier versions through to OS X El Capitan (10.11.x+), OS X Yosemite, OS X Mavericks 10.9.5 and presumably newer. Let us know in the comments if you have success with this command and the version of OS X that you have used it with.

    Thanks to Scott for the great tip, and thanks to Wiggums for the delete syntax.

    Источник

    Whether you’re feeling the pinch as hard drive space runs low or you’re just wondering where all your disk space went, it’s easy to find large files in Mac OS X by using the built-in search tools. You don’t need to use any third party tools here, instead you’ll rely on search operators and the excellent Spotlight locating functionality that is a core feature of all Macs.

    If you’ve never used these specific features of the Mac search function before, you’ll find it’s simple to do, just follow these steps to locate files and items based on their size.

    How to Find Items Based on File Size on a Mac

    This works to locate large files and items in all versions of Mac OS X:

    1. From the Mac OS Desktop, open any new Finder window
    2. Hit Command+F to bring up Search
    3. Click on “Kind” filter and select “Other”, then select “File Size” from the attribute list
    4. Click on the second filter and choose “is greater than”
    5. In the third space, enter the size to search for anything greater than (ex: 100) and choose either MB or GB as the final filter

    The file and app list below will automatically update as anything larger than the specified file size is found on the hard drive. Be sure that “This Mac” is selected if you’re getting limited results, though you can also use the search limiters to find large files contained within single folders or user directories.

    This feature is the same in all versions of MacOS and Mac OS X, regardless of the version, naming and spelling convention.

    Want to use this feature to track down large files often? Click on the “Save” button in the upper right corner and you’ll turn the File Size search into a Smart Folder that can be easily accessed from the sidebar for easy future retrieval, plus that folder will constantly be updated with large files only, making it a very useful way to instantly find any big item laying around on a Mac.

    If you’re hunting down large files because you’re running low on hard drive capacity, don’t miss these tricks to free up disk space on any Mac. Even if you’re not in dire need of more disk capacity, it’s pretty much guaranteed that you can use a tip or two from that list to find and recover some disk capacity.

    One very common pit of enormous files is the user Downloads folder, which often contains .dmg .zip and other downloaded items that have long since been forgotten, so don’t be surprised if you’re using the file size search and discover that directory is consuming much of the disk space, or at the very least, is the primary location of many large files. Typically that directory can be cleared out with little impact, though you will want to confirm the contents and the necessity of keeping them around yourself before making such a drastic move.

    Источник

    How to List All Applications on a Mac

    Need to know what applications are on any Mac? OS X offers a variety of ways to list apps that are installed on a Mac, and we’ll cover three different approaches to this: a basic listing of installed Mac apps which is sufficient for most user needs, an intermediate and more thorough listing of apps and software found in OS X, and finally, an advanced approach that is completely all-inclusive, making it possible to discovery every single app found anywhere in the file system.

    Each of these methods for listing Mac apps will work with any version of OS X.

    Читайте также:  Рабочий стол windows 10 найти значки

    Basic: Visit the /Applications/ Folder in OS X to See Installed Mac Apps

    The simplest approach to see what apps are on a Mac is to visit the /Applications folder, this will show all apps that users have installed through the App Store, that came bundled with the Mac, and that have been installed through most package managers, and by user drag & drop. For the vast majority of purposes and for most user levels, this is adequate to list what apps are on a Mac:

    1. From the OS X Finder, hit Command+Shift+A to jump to the /Applications folder
    2. Pull down the View menu and choose “List” to scroll through an easy to read list of all apps in the Applications folder

    Visiting Launchpad can also serve to list apps for novice users, though the /Applications/ folder in list view is easier to scan for many users.

    Recall that you can easily save lists of folders, including what’s within the Applications folder, into a text file by using this trick, this may be helpful for troubleshooting purposes.

    The Applications folder can be helpful when determining which apps are OK to force quit, and it can also be used to uninstall apps either by manually removing them, or by using a tool like AppCleaner to delete the app and all associated components that reside elsewhere in the filesystem.

    Intermediate: List Every Application on the Mac from System Information

    Going beyond what applications are stored within the /Applications/ folder, Mac users can also use the System Information app to list every app residing in OS X. This is intermediate to advanced, because this list does not just show end-user apps. Instead, this will include many system apps that come bundled with a Mac that have no obvious enduser purpose, performing a wide variety of system activities and functions. Absolutely do not delete or modify any of these applications unless you know exactly what you’re doing and why you’re doing it – you could easily break OS X or lose data.

    1. Option+click on the  Apple menu and choose ‘System Information’ (called ‘System Profiler’ in earlier releases of OS X)
    2. From the side menu, look under ‘Software’ and choose “Applications”

    You’ll find columns for application name, version, and where the app was obtained from, and a modification date. Clicking on an individual listing will show if the app is signed, its location in the file system of OS X, and the Get Info string data.

    Unless you know exactly what you’re doing, do not attempt to modify any application based on this list. Many apps that are required by OS X or other applications will be listed here that are not intended to be interacted with by end users.

    Advanced: Find Every Application (.app) Anywhere on the Mac via Command Line

    For advanced users and forensic purposes, you can also use the find tool to search for every single .app file (application package) residing anywhere for any user and in any folder on a Mac by turning to the command line. The syntax to perform this is as follows, sudo is used to search all system and user directories:

    sudo find / -iname *.app

    The output can be a bit of a firehose as there are tons of .app files contained throughout OS X from the root directory out, so you may want to redirect the results into a text file or limit the search to a specific directory for more manageable results.

    sudo find / -iname *.app >

    You can narrow down the search by pointing find at a specific directory or user account if need be.

    If any of these lists are too detailed or inclusive, you can also turn to the command line to list all apps downloaded from the Mac App Store, which offers a much more limited result when compared to the methods outlined above.

    There are other ways to list apps and software found throughout OS X, but the methods above should be sufficient for most user needs. If you have a particularly handy approach that you want to share, do let us know in the comments. Oh, and if you’re an iOS user, don’t feel left out, you can use a a simple Spotlight trick to see every app on an iPhone or iPad.

    Источник

    Оцените статью