About 579,000 results
Open links in new tab
  1. How can I list subdirectories recursively? - Unix & Linux Stack Exchange

    The obvious ls -dR does not work. I am currently using find /path/ -type d -ls but the output is not what I need (plain listing of sub-folders) Is there a way out?

  2. Difference between cp -r and cp -a - Unix & Linux Stack Exchange

    Aug 7, 2012 · Recursive means that cp copies the contents of directories, and if a directory has subdirectories they are copied (recursively) too. Without -R, the cp command skips directories. -r is …

  3. recursive - what is recursion when applied to the bash shell? - Unix ...

    Feb 21, 2025 · I keep hearing people talk about "recursion" for example, when you copy and paste a file and a directory you need to also put in the -r flag to tell the cp command to copy the …

  4. Recursively iterate through files in a directory

    Recursively iterating through files in a directory can easily be done by: find . -type f -exec bar {} \\; However, the above does not work for more complex things, where a lot of conditional branch...

  5. How do I grep recursively through .gz files?

    Mar 3, 2015 · -r, --recursive Read all files under each directory, recursively, following symbolic links only if they are on the command line. This is equivalent to the -d recurse option. -R, --dereference …

  6. How do I remove a directory and all its contents?

    In bash all I know is that rmdir directoryname will remove the directory but only if it's empty. Is there a way to force remove subdirectories?

  7. recursive - Using sftp to Transfer a Directory? - Unix & Linux Stack ...

    sftp, like cp and scp, requires that when you copy a folder (and its contents, obviously), you have to explicitly tell it you want to transfer the folder recursively with the -r option. So, add -r to the command.

  8. Recursively delete all files with a given extension

    A useful bit for find command - “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?

  9. Zip all files in directory? - Unix & Linux Stack Exchange

    Alternatively, zip also has a -r (recursive) option to do entire directory trees at once (and not have to worry about the dotfile problem): zip -r myfiles.zip mydir where mydir is the directory containing your …

  10. How do I set permissions recursively on a dir (with ACL enabled)?

    setfacl has a recursive option (-R) just like chmod: -R, --recursive Apply operations to all files and directories recursively. This option cannot be mixed with `--restore'. it also allows for the use of the …