Sponsored Content
Top Forums Shell Programming and Scripting Zip all the files including directories - subdirectories Post 302665487 by jim mcnamara on Monday 2nd of July 2012 04:51:17 PM
Old 07-02-2012
Warning: the -z option does not work on all UNIX systems.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

to grep and rm including all subdirectories

Is there a way to grep a word pattern in all files under all subdirectories? Similar question with rm. To remove files with certain extension in all subdirectories? Thanks to all who reply! (1 Reply)
Discussion started by: annej33
1 Replies

2. Shell Programming and Scripting

How to Remove Ctrl M characters in files from directories and its subdirectories

Hi, How to recursively remove Ctrl M characters in files from a directory and its sub directory ? I know unix2dos command is there but to remove in bunch of files ... ? Thanks (7 Replies)
Discussion started by: skdp
7 Replies

3. UNIX for Dummies Questions & Answers

Zip a folder including its sub-folders.

Hi, I have a folder that contains a few sub-folders. I would like to zip that folder and KEEP the subfolders. What it does at the moment is taking all the files within the subfolders and zipping them into one big file (zip -r ...). Does anyone know the UNIX command to keep the subfolders in the... (3 Replies)
Discussion started by: gdog
3 Replies

4. UNIX for Dummies Questions & Answers

Create zip without including directories

Hi guys, I'm trying to do the following: zip -r /tmp/foo.zip public/accounts/foo But the zip that's been made has the whole "public/accounts/foo" path. I want only the foo folder to be zipped. How can I do this? Thanks, Elías (2 Replies)
Discussion started by: elioncho
2 Replies

5. UNIX for Dummies Questions & Answers

dircmp without including sub-directories

I have 2 directories I want to compare for like files. One directory has 2 subdirectories associated with it, the other directory does not. When I do the dircmp -s I should get only a few files different between the two directories. I do, but the directory with subdirectories prints out all these... (3 Replies)
Discussion started by: MissI
3 Replies

6. UNIX for Dummies Questions & Answers

Help with untarring multiple files from tarred directories and subdirectories

Hi, I want to untar all log files from following tarred directory hierarchy Log_files.tar.gz/subject*.tar.gz/project*/*.log It means there are subject1.tar.gz to subject9.tar.gz and in those tarred subect directories there are project1 - project5 directories and in those directories there... (2 Replies)
Discussion started by: rv_trojan
2 Replies

7. UNIX for Dummies Questions & Answers

show all text files in directories and subdirectories

Hi! I am trying to find all text files in my home directory that contain the string "C-d" so I tyied this : cd ~ find . -type f -exec grep -l "C-d" {} + but it took very long so I tryed this : ls -aR | xargs file |grep text but it didn't descend in the directories and it said :... (3 Replies)
Discussion started by: kelamahim
3 Replies

8. Shell Programming and Scripting

Find file and zip without including directory path

Does anyone know of a way to zip the resulting file from a find command? My approach below finds the file and zips the entire directory path, which is not what I need. After scanning the web, it seems to be much easier to perform gzip, but unfortunately the approach must use zip. find `$DIR`... (5 Replies)
Discussion started by: koeji
5 Replies

9. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies

10. Shell Programming and Scripting

Append string to all the files inside a directory excluding subdirectories and .zip files

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
mount(8ufs)															       mount(8ufs)

Name
       mount - mount the local ULTRIX File System (UFS)

Syntax
       /etc/mount [ -t ufs -r ] [ options ] device directory

Description
       The  command announces to the system that a file system is present on the device device.  The specified device must be a local device.  The
       file directory must exist and it must be a directory.  It becomes the name of the newly mounted file system.

       To further protect from system crashes, only file systems that have been cleanly checked by are	mounted.   In  emergency  situations,  the
       superuser can override this requirement by using the option as shown below.

       General users can mount file systems with certain restrictions in addition to those listed in The file system must have the clean byte set.
       To ensure the clean byte is set, run the command on the file system first.  You can also try the mount and if it fails, then run  and  then
       try the mount again.

       Note that the user must have execute permissions on the device.

       A successful ufs-mount may generate the following warning message:
       "Warning, device has exceeded xxx threshold, fsck(8) is advised"
       where  xxx  is  which metric was exceeded to cause the clean byte timeout factor to reach zero. See for an explanation of the timeout algo-
       rithm.

       Physically write-protected disks and magnetic tape file systems must be mounted read only or an error will occur at mount time.

Options
       See the reference page for a description of the -t option.

       -o options  Specifies options as a sequence of comma-separated words from the list below.

		   force	 The superuser can force the mounting of unclean file systems.	You should use the flag only in  single-user  mode
				 when repairing or recovering damaged file systems.

		   nodev	 Block and character special devices cannot be accessed from this file system. If you are concerned with nfs secu-
				 rity, all ufs file systems that will be exported via nfs should be ufs mounted with the option.

		   noexec	 Binaries cannot be executed from this file system.

		   nosuid	 The and programs may not be executed from this file system. If you are concerned with nfs security, all ufs  file
				 systems that will be exported via nfs with the option specified in the file should be ufs mounted with the nosuid
				 option.

		   pgthresh=##	 Set the paging threshold for this file system in kilobytes.  The default is 64 kilobytes.

		   sync 	 All writes are immediately written to disk (synchronously) as well as to the buffer cache.  For the option to	be
				 meaningful, the file system must be mounted with write permissions.

       -r	   Mounts the device on directory read only.

Restrictions
       The command should only be invoked by the command.  Users (and superusers) should not invoke the command.

Examples
       The command calls to do its work and is the preferred interface.  A sample command is:

	    # mount -t ufs -o nodev,nosuid,noexec,pgthresh=100 /dev/ra0g /usr

Files
       UFS-specific mount program

See Also
       getmnt(2), mount(2), fsck(8), mount(8)

																       mount(8ufs)
All times are GMT -4. The time now is 08:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy