Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mac Osx Web Server

Hello,


I have a macosx Lion webserver. There are some documents under the people tab. Over 1000 users and each one has some pdf files associated with their account. Just wondering if there is a script or something that I could run which would export all pdf files from users into separate folders ?


ThanksUser uploaded file

Mac mini, iOS 7.1.2, Macosx Lion

Posted on Nov 12, 2018 3:13 PM

Reply
1 reply

Nov 12, 2018 4:52 PM in response to manindersinghgill

This question doesn’t seem centrally related to Lion Server, save for the directory path related to the web server.


Look around under /Library/Server, (/Library/Server/Web, IIRC, but it’s been years since I’ve been running Lion Server, and the Server.app moved the directories around once or twice over the various versions) and you’ll find the web server directories buried under there.


Then check the organization of the PDF files you're interested in, and work from there.


Basically, find the files you're interested in, and either copy those, or post an example of the path(s) and file(s) for the source files for the transfer, and somebody here dan help with a bash command or shell script or similar. (I haven’t had a 10.7 server around in a very long time, unfortunately.)


It’s also possible somebody has enabled per-user directories within Apache, which means the PDF files would be under per-user directories in each user login.


If you can’t find the files, find the name of a file and use the following shell command:


sudo find / -iname foo.pdf -print


That’ll search the entire file system for all files named foo.pdf. You’ll need to enter an admin password for the sudo, as root access is needed to override access and search everywhere.

Mac Osx Web Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.