10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
What I know so far:
ls -A will list all files except those starting with a dot
ls -d will list all directories
ls -m will separate contents by commas
For getting crtimes use:
stat filename will give me the inode number
or
ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies
2. UNIX for Advanced & Expert Users
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies
3. Shell Programming and Scripting
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies
4. Shell Programming and Scripting
Hello all,
I am having a hard type in figuring out how to only gather certain files in the current directory without exploring its subdirectories.
I tried:
find . -name "*.ksh" -prune
this also returns ksh files from lower subdirectories.
I also tried
find . -ls -name "*.ksh"
This also... (8 Replies)
Discussion started by: gio001
8 Replies
5. Shell Programming and Scripting
I am trying to use a loop to strip of the funny character ^M at the end of all lines in each file found in current directory and I have used the following in a script:
find . -type f -name '*.txt' | while read file
do
echo "stripping ^M from ..."
ex - "$file" > $tempfile
%s/^M//g
wq!
# mv... (4 Replies)
Discussion started by: bisip99
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a program that get a directory name from the user, then the program should go through one by one of the file, asking the user whether to move it to another folder. I tried to list the time of the file one by one. But it seems like it doesn't work. The code is as follow:
check()
{... (10 Replies)
Discussion started by: mInGzaiii
10 Replies
7. Shell Programming and Scripting
Hello,
Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.
The files names don't follow any defined rule, so they can be just letters without (.) period
Directory structure example: ... (0 Replies)
Discussion started by: Peter321
0 Replies
8. Shell Programming and Scripting
Hi All
I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age.
I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies
9. 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
10. UNIX for Dummies Questions & Answers
I can't manage to list all files that are not directories from current directory. (2 Replies)
Discussion started by: beni22sof
2 Replies