For two graphs J and H, the generalized Turan number, denoted by ex(n, J, H), is the maximum number of copies of J in an H-free graph of order n. A linear forest F is the disjoint union of paths. In this paper, we determine ex(n, S-r, F) when n is large enough, which generalizes the results on ex(n, S-r, P-k) and ex(n, (k + 1)P-2). Finally, we prose a problem related to the number of graph copies in an F-free graph under shifting operations.