goglpic.blogg.se

Linux find file recursive
Linux find file recursive








linux find file recursive

To move file to a usb pen mounted at /mnt/usb/, run the mv command: To get rid of all files and its sub-directories recursively use following command: To delete unwanted file on Linux use the rm command: For example, you cannot remove or move the Linux kernel or diver directories. What next?ĭepend upon file/dir type you can either move or delete the file. Great! I found the largest files on my disk. In other words, only display the top 10 results from previous commands. The head command is used to control and show the first part of files. The -n is for numeric sort and the -r passed to sort will reverse the result of comparisons. This speailized output makes it easy to sort out file names using the sort command. -printf '%s %p\n' – Force find to use print format on the scren, interpreting \ escapes and % directives.

linux find file recursive

-type f – Search for regular files only.

linux find file recursive

Where, find command options are as follows:










Linux find file recursive