About 950,000 results
Open links in new tab
  1. How can I delete all lines that contain a specific string from a text file?

    How would I use sed to delete all lines in a text file that contain a specific string?

  2. What permissions are needed to delete a file in unix?

    Feb 11, 2019 · The minimum number of permissions to delete a file is and . But permission is needed to know the name of the file you want to delete... From the linked doc, it seems that one only needs and …

  3. linux - find and delete file or folder older than x days - Stack Overflow

    Do you want to delete directories and files with a single find command, or are you ok with two separate commands?

  4. How can I delete a file or folder in Python? - Stack Overflow

    How do I delete a file or folder in Python? For Python 3, to remove the file and directory individually, use the unlink and rmdir Path object methods respectively:

  5. How do I force delete a file? - Ask Ubuntu

    Apr 9, 2016 · cd Desktop (I'm assuming that your file is placed in your desktop directory and you installed Ubuntu in English international / US). To delete the file run this command: rm -f …

  6. How can I recursively delete all files of a specific extension in the ...

    Nov 15, 2013 · 10 If you want to delete all files of a certain type, but only 1 folder "deep" from the current folder: find . -maxdepth 2 -name "*.log" -type f -delete -maxdepth 2 because the current directory ". " …

  7. How to delete multiple files at once in Bash on Linux?

    May 9, 2012 · I'd recommend running ls abc.log.2012-03-* to list the files so that you can see what you are going to delete before running the rm command. For more details see the Bash man page on …

  8. How do you delete files older than specific date in Linux?

    95 I used the below command to delete files older than a year. find /path/* -mtime +365 -exec rm -rf {} \; But now I want to delete all files whose modified time is older than 01 Jan 2014. How do I do this in …

  9. How can I delete a file only if it exists? - Stack Overflow

    Well, it's entirely impossible to remove a file that doesn't exist, so it seems that the concept of "delete a file only if it exists" is redundant. So, rm -f filename, or rm filename 2>> /dev/null, or [[ -r filename ]] …

  10. How to remove all files from a directory? - Ask Ubuntu

    Nov 23, 2014 · 543 Linux does not use extensions. It is up to the creator of the file to decide whether the name should have an extension. Linux looks at the first few bytes to figure out what kind of file it is …