rm is the command to remove files

learn more… | top users | synonyms

1
vote
1answer
67 views

Prevent active file removal on an NFS filesystem

I clear my logs using following script - find "." -mtime 1 -type f -print0 | xargs -0 rm -rf But it deletes the active files also and creates .nfsā€¦ files instead. Is there any way to prevent ...
0
votes
1answer
61 views

Delete subfolder and keeping up parent folder

I need to delete folderx which are not accessed for seven days, easily I can do it with next: find /path/folder -type d -mtime +7 |xargs rm -rf The probelm is when I have subfolder marked for ...
0
votes
1answer
145 views

when is it safe to remove `/dev/.tmp-block-*` files

i'm currently experimenting with temporary lvm-snapshots (that is: create a snapshot of an LV, do something with the snapshot (e.g. run a backup), then destroy the snapshot. something along the lines: ...
2
votes
0answers
78 views

Why is my inotifywait loop exiting after removing some subdirectories?

i have the following bash script: #!/bin/sh dir1=/source/dir/path/ while inotifywait -qqre modify "$dir1"; do rm -r /destination/dir/path find /source/dir/path/ -name .svn -exec rm -rf '{}' \; ...
0
votes
0answers
38 views

named.run file deleted but data left on disk?

Today I had a name-server stop resolving DNS due to the /var directory being full from the named.run cache build up. I tried removing all the files using: rm -rf name* However, although running ls ...