Software :: Find Not Searching Subdirectories?
Jul 12, 2010
I tried searching for files in documents: joe@Debian:~/documents$ find -iname *.odt ./canadian-public-holidays.odt I then moved to the work_search directory which is located in documents: cd work_search joe@Debian:~/documents/work_search$
joe@Debian:~/documents/work_search$ find -iname *.odt
[Code]...
View 6 Replies
ADVERTISEMENT
Nov 18, 2010
This question is very similar to this one except that I want to maintain the file's original subdirectories.
For example if I had
/temp/a/a.txt
/temp/a/a.jpg
/temp/a/b.txt
/temp/b/c.txt
/temp/d/d.txt
/temp/d/d.jpg
/temp/d/e.txt
/temp/f.txt
[Code]...
View 2 Replies
View Related
Jan 24, 2011
1. How can you find all first level subdirectories under the current directory?
2. How will you show the last 100 lines of the file "foo.log"?
3. How will you Stream the contents of a the log file "foo.log" as it gets written to?
4. How can you grep for a pattern on a gzip'ed file? e.g., find "foo" in bar.gz
5. Find all lines in the file "foo" which DON'T have the pattern "bar"
6. Your web server is running very slowly. If you can login to the server, what command will you run to find out cpu and memory use?
7. Extract the file foo which is a part of the tar'ed, gzip'ed file bar.tar.gz
8. You attach a usb disk to your linux desktop, but it does not show up. How can you get more information about the error?
9. What is the secure way to login to remote systems?
10. What is the difference between TELNET and SSH?
11. Given a file 'a' with the following permissions -rwxrwxrwx 1 rohit rohit 0 2011-01-24 13:30 a Change its permissions such that it is only readable and writable by its owner, not accessible by anybody else in the group and only executable by the world
12. Difference between using ' and " for quoting a string / command in a shell
13. In the attached text file (test.txt) replace all occurrences of 'red' with 'yellow' without using an editor (i.e. from the command line)
14. How would you suppress output written to stderr by a command
15. Meaning of the #! notation in scripts e.g. #!/bin/sh
16. What is the output of the attached shell script test.sh Scripting questions, all based on the attached file access.log. Use one of perl, python, ruby, or shell scripts to solve these questsions. If any answer is obtained using just the command line, please include those commands as well.
17. How many accesses were made between 10am and 11.30am on Jan 24, 2011?
18. How many unique IP addresses accessed this server?
19. For every IP address which accessed this server, output a report showing number of hits for every type of HTTP status. For e.g., IP 192.168.1.20 has 164 hits with status 404 and 1690 hits with status 200.
View 8 Replies
View Related
May 28, 2010
I need to write a script that is given a directory as an argument, and it prints the last modified file from that directory and all its subdirectories.
for example:
$ newest /usr/etc
--> /usr/etc/httpd/httpd May 28 12:16
If I had to do it only for the current dir, it would be easy...I'd probably use "ls -lt" and then show only the first line...
View 1 Replies
View Related
Jun 7, 2010
tell me the command used to find a specific word in directories and sub-directories in linux?
View 4 Replies
View Related
Nov 2, 2010
I am looking for all the files that contain the text string 'moo.sql'. I ran the following:
find . -name '*.php' | grep -lir 'moo.sql' *
Unfortunately it seems to return non-php files in addition to php files. I thought the find portion of this would filter the file names so grep would only search php files.
View 3 Replies
View Related
Jan 5, 2011
When I used the find command, I almost always need to search the local drives. But, I almost always have super large network shares mounted and these are included in the search. Is there an easy way to exclude those in the find command, grep and other similar commands? Example:
find / -name .vimrc
View 1 Replies
View Related
Jan 30, 2011
I recently installed Fodora 14 on a PC with Asus mainboard.
CPU is AMD LE-1100.
The sound card is Realtek ALC662-GR Azalia High Definition Audio
Unfortunately after installation, there is no sound.
In fedora, System->Preferences->Sound window, Hardware tab is empty.
I tried to install two versions of sound card driver.
One came from the CD of the mainboard called realtek-linux-audiopack-4.06x
First I tried to run the "install", it went through to the final GUI stage searching for the sound card but failed to find.
Then I tried to do a manual install following the readme file.
Basically, unpack->configure->make
but make failed with the following error message
make[1]: Entering directory '/home/user/00Sound/realtek-linux-audiopack-4.06x/alsa-driver-1.0.14rc3-4.06x/acore' .....
/lib/modules/2.6.35.6-45.fc14.i686/build/include/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
make[1]: *** [memalloc.o] Error 1
make[1]: Leaving directory '/home/user/00Sound/realtek-linux-audiopack-4.06x/alsa-driver-1.0.14rc3-4.06x/acore'
make: *** [compile] Error 1
Later I tried to download another version of the driver from Realtek website
realtek-linux-audiopack-5.15
make also failed but with a different error:
make -C /lib/modules/2.6.35.6-45.fc14.i686/source SUBDIRS=/home/user/00Sound/realtek-linux-audiopack-5.15/alsa-driver-1.0.23 CPP="gcc -E" CC="gcc" modules .....
make: *** [compile] Error 2
View 1 Replies
View Related
Oct 5, 2010
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies
View Related
Aug 18, 2010
I looked through google but can't find an answer for this..... say I have a directory called "files"; this directory contains several other directories..... what I wanna do is delete ALL the files within the subdirectories, but NOT delete the subdirectory. Can this be done easily without having to run a command for each subdirectory?
View 8 Replies
View Related
Jun 24, 2010
Is there a way in .bashrc to say, instead of "add X to PATH, add X/Y to PATH, add X/Z to PATH", simply "add all subdirectories of X to PATH"?
[code]...
View 4 Replies
View Related
May 19, 2011
I have want to list sub-directories with spaces but am facing the following problem:
My subdirectories are:
FirstDirectory
Directory with spaces
if I use
Code:
for directory in "`find . -type d`"
[Code]...
View 5 Replies
View Related
Dec 9, 2010
Is there an easy way to create all subdirectories of a path in linux ?
Something like
mkdir /a/b/c/d/e/f
executed in / should create directories a,b,c,d,e,f
View 2 Replies
View Related
Jan 12, 2011
I am going to use 'rsnapshot' to create backups of my local & remote computers. My intension is that I can use these backups to restore disk images when needed -> install Linux from scratch and then copy the subdirectories from 'rsnapshot' backup to the new Linux installation.My question is what subdirectories should be excluded in the backup.
View 6 Replies
View Related
Jul 19, 2010
When I installed a new copy of my distro on another partition, in order to preserve all the settings from my old my user account, I made a user account with the same name on the new installation, and then copied my old user account's files (in their entirety) to the new user account, overwriting it. I did the copying from the root account (where else? I assume the new user account can't overwrite itself while it's open), and root became the owner of everything I copied, making it impossible to open the new user account. So I then chowned the new user account's folder to myself. I still can't get in, because apparently, chown only chowned the top folder, leaving all subdirectories owned by root. How do I make chown include all subdirectories? I scanned the man page, but didn't see a parameter.
View 4 Replies
View Related
Feb 11, 2010
I set up a Debian box with Apache and everything works fine, but when trying to access files in a subdirectory, I get a 403 error. The error log shows the following:
Code:
(13)Permission denied: /var/www/site/images/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
I tried adding a <Directory> entry in the conf file for the site and even tried adding (with +r for all) an .htaccess file (.htaccess is not specified in the conf file and the root directory doesn't have one either), but nothing works.
[Code]...
View 1 Replies
View Related
Jun 19, 2011
I wonder how i can get subdirectories (.INBOX/***/*** etc...) in dovecot.I just stardet a mail server and when i tried to create it from the mail client (MS Outlook) it says that the server wont allow it.
View 4 Replies
View Related
Jun 25, 2011
I have a large directory tree with my ebooks and some of these files are zipped. I would like to move all of the zip files to another one so I can manipulate them. Since they are all scattered inside the tree, I would like to do it quickly and painfully with CLI. How should I proceed?
[code]...
View 10 Replies
View Related
Aug 8, 2009
So, let's say there was a website www.qwerty.com, which is completely appropriate if not necessary except for the asdfg subfolder (www.qwerty.com/asdfg), which contains,say, pornographic material I want blocked. Is there any way to block "asdfg" without blocking the entire domain (www.qwerty.com)? I already tried editing my hosts file, but apparently that only works for whole domains.Also, while we're at it, can the hosts file be used to actually block IP addresses, or just domain names (so if I wanted qwerty.com with IP of 128.127.126.125 to be completely blocked, but know my family or employees are little smarter than that, I could add the line "0.0.0.0 128.127.126.125" to prevent all access to that website)?
View 3 Replies
View Related
Jun 30, 2011
I have a nfs share on my 11.4 workstation at /abcd. I'd like to export everything under /abcd except for one directory /abcd/dontexport
I searched online for such an option but only came across noaccess option which doesn't seem to work.
exportfs says it is an unrecognized option if I run "exportfs -ra"
This is how my /etc/exports looks like:
Code:
/abcd*(rw,wdelay,root_squash,no_subtree_check,anonuid=12345,anongid=6789)
View 2 Replies
View Related
Feb 22, 2010
How can I remove all .swp files in all of my subdirectories under Linux?
View 4 Replies
View Related
Sep 4, 2010
i currently have hundreds of files all in a single directory. What I would like to do is create 8 subdirectories and move the files into the subdirectories based on the first character of the file name. Ideally, the script would omit any 'the' or 'a' and use the second word for filing purposes. No filenames have spaces. Instead they use periodsThe subdirectories will be:
0-9
a-d
e-h
[code]...
View 2 Replies
View Related
Oct 20, 2010
I've been doing some file-sharing with Ubuntu. And I've noticed that the files only in the immediate directory is shared, the rest of the folders are shown in other PCs but access is denied. How can I share all the subdirectories in a folder without having to them manually?
View 6 Replies
View Related
Nov 24, 2010
I figured I'd try out the Ubuntu Minimal install; I liked the concept of minimal distros like Arch-Linux (with a what-you-need-is-what-you-get type of system), but I really liked the community and general support of Ubuntu. Anyway, everything went fine after I got GRUB working properly, up to the point when I found that there were no subdirectories in my user's folder (Templates, Documents, Videos, etc).
I just decided to create the folders I needed. However, there were two issues I came across when doing this: The items in the 'Templates' folder don't show up in the context menu like they should More importantly, the icons for each folder would have to be manually changed for every new icon theme (if I wanted to use a new icon theme, I would have to navigate to the theme's folder every time for each icon I wanted changed) I'm not too concerned with the templates at the moment, but I was wondering how I would make these icons dependent on the current icon theme. Is there some package I missed installing?
By the way, if it makes a difference, I'm trying to set up the default Humanity icon set (well, not default for me, since I'm using Ubuntu Minimal). Also, sorry if this question has been posted before (or if I find the solution immediately after posting, which almost always happens to me), I didn't know exactly what to search for...
View 2 Replies
View Related
Oct 19, 2010
I am trying to create a script.
$test=exec ("rar a -r -v10M /var/www/html/utl/packed/folder.rar /var/www/html/utl/Downloads/folder/");
There is no files in /var/www/html/utl/Downloads/folder/ but a few folders are there which need to be added to folder.rar I am using correct exec and outputting it in php but output shows me Warning: No files.
View 2 Replies
View Related
Nov 23, 2010
I am having a directory.This directory has a lot of subdirectories which contain html pages and some c source code files,Makefiles etc etc.The script I am trying to write would be executed from one directory which has all these subdirectoriesFollowing is the set of directories and files you can see
Code:
ls
delete.sh lddbus Makefile misc-progs sbull scullc scullp short simple
[code]....
View 6 Replies
View Related
Mar 10, 2011
How can I search for a string (for example, a constant) in all the (.cpp) files in the current direcotire and subdiretories.
View 4 Replies
View Related
Jul 8, 2011
Performing commands in multiple subdirectories simultaneously. I'd like to run a program I've copied into every subdirectory which takes *.in files in the current directory as input files. I can find the program, but how do I tell it to run when I've found it?
View 1 Replies
View Related
Jan 5, 2011
I am trying to set up my local development environment to mimic the behaviour of my webhost: namely executing *.cgi files as CGI scripts, regardless of their location. If I'm not mistaken, the default setup of Apache on Ubuntu has this set up for /usr/lib/cgi-bin only.
I have tried adding +ExecCGI to the /var/www directory settings in /etc/apache2/sites-enabled/000-default. I have also tried AddHandler cgi-script .cgi in the same <directory> block.
View 3 Replies
View Related
Jul 28, 2011
I'm not a complete newbie in Linux, but I was working some years solely with Windows. But some weeks ago I remembered my old love and installed Ubuntu Natty 64 bit. Last night I installed also Oracle 11gR2 64 and got it finally running after some fights with missing packets and unexpectedly placed libs. (Unexpected by Oracle installer). Nevertheless; Oracle is running now.Ok so far. This is the good news. The bad news: In one of these fights I was in a terminal-session and accidentally entered sudo rm -r /usr/share/doc while I wanted to delete /usr/share/doc/libstdc++5. I wondered why this takes so long time and stopped it as I saw what I did. But too late of course, there are many subdirectories missing.My question now: Is there a way using apt-get, dpkg or similar to rebuild these subdirectories in /usr/share/doc?Natty is still running fine for now. But what happens if there are updates or new packets?
View 6 Replies
View Related