09-25-2006
I changed the code a little to this
find /cep -type f -print | ls -l | head
It worked, but not sure I have all the files in the subdirectories.
Can someone help me here?
Thanks
igidttam
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
I'm trying to find the 50 largest file in a directory named /sasdb and its' subdirectories. I'm using the find command and a pipe to awk
Not sure if I'm actually getting the largest files from this directory and its subdirectories. Here is the code I used...
find /sasdb -ls | awk '{print... (8 Replies)
Discussion started by: igidttam
8 Replies
2. Shell Programming and Scripting
Hello my friends,
I need to write a simple shell bad file :D that search and delete a file it's name 'Microsoft.txt' in the current directory and its subdirectories?
So can you help to guide me how i can write this shell, Just give me the beginning :o thank you. (1 Reply)
Discussion started by: Net-Man
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
How to find the list of 5 largest(size wise) file in current directory?i tried using
ls -l | sort -t " " -r +5 -6 -n | head -5
but this is not giving correct output as ls -l command gives 1 extra line of output that is how many total files are there!so by running the above... (4 Replies)
Discussion started by: salman4u
4 Replies
4. UNIX for Dummies Questions & Answers
What is the best way to find the largest files in a directory? I used du -k|sort -rn |less.
I got a results for this. But if I used the following command , I got another result...a different order in the same directory. Why is that?
ls -la |awk '{print $5," ",$9}' sort -rn|less. I saw that... (6 Replies)
Discussion started by: Pouchie1
6 Replies
5. UNIX for Dummies Questions & Answers
hi all,
i want to list the five largest files in current directory ...
. (3 Replies)
Discussion started by: sonu_pal
3 Replies
6. Shell Programming and Scripting
how can i find number of lines in files & subdirectories ? (3 Replies)
Discussion started by: pcbuilder
3 Replies
7. UNIX for Dummies Questions & Answers
Question:
How to search & list subdirectories with the given file name?
For example:
The directory structure looks like;
/Builds/DEV/Build_RL01/DDL/
a_tbl_cre.sql
......
/Builds/DEV/Build_RL01/DML/
a_upd.sql
....
....
Requirements:
1. I need to find subdirectory DML which is... (0 Replies)
Discussion started by: Siva SQL
0 Replies
8. Shell Programming and Scripting
How to list all Subdirectories and files with its full path in a parent directory? (1 Reply)
Discussion started by: johnveslin
1 Replies
9. Shell Programming and Scripting
I need to write a script to :
list files with *.i extension in a directory and all its subdirectories + 30days old, save it in a file and then remove (2 Replies)
Discussion started by: lena keung
2 Replies
10. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
HEAD(1) User Commands HEAD(1)
NAME
head - output the first part of files
SYNOPSIS
head [OPTION]... [FILE]...
DESCRIPTION
Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=[-]NUM
print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file
-n, --lines=[-]NUM
print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
-z, --zero-terminated
line delimiter is NUL, not newline
--help display this help and exit
--version
output version information and exit
NUM may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T,
P, E, Z, Y.
AUTHOR
Written by David MacKenzie and Jim Meyering.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report head translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
tail(1)
Full documentation at: <http://www.gnu.org/software/coreutils/head>
or available locally via: info '(coreutils) head invocation'
GNU coreutils 8.28 January 2018 HEAD(1)