Sponsored Content
Top Forums UNIX for Dummies Questions & Answers command to get count in unzipped folder Post 302141048 by porter on Wednesday 17th of October 2007 12:28:50 PM
Old 10-17-2007
Code:
man test

...

    -r file       True if file exists and is readable.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

zipped or unzipped file

Is there a way you can tell if a file is still zipped or it's unzipped I have a file called ssss.zip and I would like to know if this file is still zipped or if it's unzipped? I'm on IBM AIX/RS6000 (3 Replies)
Discussion started by: ted
3 Replies

2. UNIX for Dummies Questions & Answers

Zip command (zip folder doesn't include a folder of the same name)

Hi guys, I have a question about the zip command. Right now I have a directory with some files and folders on it that I want to compress. When I run the zip command: zip foo -r I am getting a foo.zip file that once I unzip it contains a foo folder. I want to create the foo.zip, but that... (1 Reply)
Discussion started by: elioncho
1 Replies

3. UNIX for Dummies Questions & Answers

See the date of file after its been zipped and unzipped?

I have some log files that have been gzipped and then compressed using cpio. There are a number of log files that have been compressed to the one file. When I extract them the date of the file when doing an ls -la is today's date (the date I extracted them). Is there anyway to see the date... (3 Replies)
Discussion started by: Sepia
3 Replies

4. Shell Programming and Scripting

Count matching filenames in a folder

Hi all, I have 4 files for example named abc01012009.txt abc02012009.txt abc03012009.txt abc04012009.txt in a folder. I would like to firstly backup the latest file available, in this case, the latest date available, abc04012009.txt to its subfolder named backup, and then rename the... (4 Replies)
Discussion started by: tententen
4 Replies

5. UNIX for Dummies Questions & Answers

How to obtain a count of files in a folder and it's subfolders

First of all, the extent of my unix knowledge is next to nil. I've been able to telnet to a unix box, and thanks to the Computer Hope website, I've been able to learn a few basic commands to navigate from folder to folder, and view contents. What I really need to do is obtain a count of all... (2 Replies)
Discussion started by: scarfinv
2 Replies

6. UNIX for Dummies Questions & Answers

Separate text files in a folder by word count

Hi, been searching Google for like an hour and I doubt I got the right keywords so might as well ask here. What I need: Before: Article1.txt 564 Article2.txt 799 Article3.txt 349 Article4.txt 452 * Separate files over 400 wordcount * After: Article1.txt 564... (3 Replies)
Discussion started by: Richard2000
3 Replies

7. Shell Programming and Scripting

Get the file count in a folder

What is the best way to get the file count (Including the subdirectories) under a folder? (12 Replies)
Discussion started by: un1xl0ver_rwx
12 Replies

8. Shell Programming and Scripting

Renaming unzipped files with name of archive

I am attempting to rename files within a zipped archive with the beginning of the name of the zip file. For example unzip AAA_000.zip and rename file1.csv, file2.txt to AAA_file1.csv, AAA_file2.txt. I am able to do this for a zip file with one file inside, but not for multiple files. This is... (2 Replies)
Discussion started by: lcp
2 Replies

9. UNIX for Dummies Questions & Answers

Adding unzipped files to a Zip

Hey all, I have a zip file which I received, and I need to replace one of the files inside of it. I tried the obvious solution of unzipping the zip, replacing the file, and rezipping, but the following happened: Original Zip Size: 79MB Unzipped Size 80MB New Zip: 36MB When I feed the... (2 Replies)
Discussion started by: DeanLeitersdorf
2 Replies

10. UNIX for Advanced & Expert Users

Searching for file types by count in specific folder in RHEL 6

So I'm trying to search for the top 10 or 15 items under a directory by file type. I want to run a command on a directory and get something like the following: Example of expected output.. .PDF: 100, .txt: 95, .word: 80.. What would be the best way of going about this? I've searched around... (2 Replies)
Discussion started by: shackle101
2 Replies
dcheck(8)						      System Manager's Manual							 dcheck(8)

NAME
dcheck - Checks directory consistency SYNOPSIS
/usr/sbin/dcheck [-i inumbers] [filesystem] OPTIONS
The -i option is specified with a list of inumbers. If a specified inumber is found in a directory, the dcheck command displays the inum- ber, the inumber of the directory, and the name of the entry. DESCRIPTION
The fsck command supersedes the dcheck command for normal consistency checking. The dcheck command reads the directories in a file system and compares the link-count in each inode with the number of directory entries by which it is referenced. If a file system is not specified, a set of default file systems is checked. To get optimum performance, specify the raw version of the special file because the ilist is read in large chunks. RESTRICTIONS
Because the dcheck command uses two passes to check directories, it may produce erroneous diagnostics if active file systems are checked. ERRORS
If a file is found and the link-count and the number of directory entries do not agree, dcheck reports relevant information. Allocated files that have 0 link-count and no entries are also listed. A potentially dangerous situation occurs if there are more entries than links. If entries are removed and the link-count drops to zero (0), the remaining entries point to nothing should be removed. If there are more links than entries or if there is an allocated file with neither links nor entries, some disk space may be lost. SEE ALSO
Commands: clri(8), fsck(8), icheck(8), ncheck(8) Files: fs(4) dcheck(8)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy