[colug-432] help with a command

Stephen Potter spp at unixsa.net
Sun Aug 10 15:30:36 EDT 2014


I'm misunderstanding your question, or everyone else is.

Are the files named *.PA or are the directories named *.PA?

What are the names of the files within the directories?   And, is the 
print spooler still running?

Assuming:
     the directories are *.PA
     the files inside are regular files (not hidden files)
     the print spooler isn't running (new jobs aren't getting created 
and deleted)
     you are running as root (or someone else with the appropriate 
permissions)

The command I gave you will delete only the files and not the print 
queue directories.  Although, honestly, I'm not sure why you want to 
keep the queue directories.  The directories should be deleted when the 
job is completed anyway.

Oh, make sure you are running /bin/rm and you don't have some weirdo 
alias horking things up.

-spp

On 8/10/2014 2:35 PM, Keith Larson wrote:
> that's what I thought, but no.
> rm: cannot remove `*.PA/*': No such file or directory
>
> Keith Larson
> Franklin Computer Services - K12group
> klarson at k12group.net <mailto:klarson at k12group.net>
> (614) 561-4887 (mobile)
> >>> Stephen Potter <spp at unixsa.net> 8/10/2014 2:25 PM >>>
> >
> How about "rm *.PA/*"
>
> -spp
>
>
> On 8/10/2014 1:53 PM, Keith Larson wrote:
>> I am searching for a way to empty the contents of a bunch of folders 
>> without removing the folders themselves AND leave other files at the 
>> currect directory level alone.
>> I have a bunch of print queue folders.
>> du -shc *.PA
>> shows these results
>> 199M 4A81C53F.PA
>> 941K 4A81D556.PA
>> 0 4A81D56D.PA
>> 192K 4A81D582.PA
>> 632K 4A81D598.PA
>> 0 4A81D5AD.PA
>> 254M 4A81D5C0.PA
>> 0 4A81DF1B.PA
>> 0 4A81DF45.PA
>> All folders have a .PA extension so they are easily identified.
>> You can see that some are empty and some have files (print jobs) in 
>> them.  I want to delete all files from WITHIN these folders and 
>> nothing else.
>> Can someone help with a single command that will do this?
>>
>> _______________________________________________
>> colug-432 mailing list
>> colug-432 at colug.net
>> http://lists.colug.net/mailman/listinfo/colug-432
>
>
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20140810/c23287bb/attachment-0001.html 


More information about the colug-432 mailing list