General :: Finding Files Under The Current Directory?

Oct 5, 2010

Assumed y directory structure looks as follow:

Code:

--root
-- dir1
-- dir1-1
-- dir2
-- dir2-1
-- dir2-2

And under each sub dir there are some log files ended with .log. Now I want to list all these log files. How to to that?

View 2 Replies


ADVERTISEMENT

General :: Command For Finding File / Directory From Current Path

Apr 30, 2010

I am total new to linux as I worked mostly on RTOS (symbian). My problem is, I need to find the file IOSTREAM.H and I am following commands below:
1) cd /
2) find . iostream.h ( finds the file / directory from the current path)
It shows No such File or Directory

View 7 Replies View Related

General :: Find A String In Files Under The Current Directory?

Oct 5, 2010

Assumed y directory structure looks as follow:

Code:
--root
-- dir1
-- dir1-1

[code]....

And under each sub dir there are some log files ended with .log. Now I know how to list all these log files with:

Code:

find . -type f -name "*.log"

Assumed now there is a string called "Hello World" inside some of these files. How can I find out these files? I try followings but failed

Code:

grep "This is" | find . -mtime 0 -type f -name "*.log"

View 4 Replies View Related

General :: Ls Command And Displaying Number Of Files In Current Directory?

Oct 15, 2010

What command will provide you with the number of files in your current directory?
Choose one answer.
A. ls -c
B. ls | wc -w (this one)
C. ls -n | count
D. ls -wc (this one ?)

View 5 Replies View Related

General :: Use Sed To Edit String In Multiple Files Not Contained In Current Directory?

Apr 7, 2011

I have the following problem:

CASE_FOLDER
----------->0_FOLDER
-------------------->ForceX ForceY ForceZ

[code]...

View 1 Replies View Related

General :: Finding A File Which Is Being Written Recently In Directory Of 1000 Files?

Apr 13, 2011

How to find a file which is being written recently in directory of 1000 files?

View 8 Replies View Related

Programming :: All The Above Files Are Removed From The Current Directory?

Feb 14, 2011

When I run:make -f mymakefile clean I get:rm -f mybinary *.so.* *.dep *.o mybinary.symand all the above files are removed from the current directory.But I have a directory /src/ where I have all my source files located. The *.o file in this directory are not removed?

View 4 Replies View Related

Programming :: Script For Finding The First X-GB Of Files In A Directory?

Jun 23, 2010

I once had a script that when run would find the first 800GB of files in a directory (including subdirectories) and write them to a file (ie: ./800gb.sh > manifest.txt).I used this to create manifests of 800GB worth of data from large directories in order to dump to tape (LTO4).I'm sure its gotta be a pretty simple script, but I am not very skilled at writing bash scripts.

View 4 Replies View Related

Ubuntu :: Get A Recursive Listing Of All Files Under The Current Directory?

Jan 2, 2011

If I runls -R1I get a recursive listing of all files under the current directory.However, if I dols -R1 *.avi, ie I want to search only for files with the file descriptor .avi, I get an errorQuote:ls: cannot access *.avi:No such file or directorySo it seems I am using ls incorrectly. What's the correct way to use wild card pattern matching when using the -R switch? Or maybe that isn't possible?

View 2 Replies View Related

Ubuntu :: Put All Of The Current Directory's Files On The Command Line?

Feb 21, 2011

Is there an easy way to put all of the current directory's files on the command line, without tab-completing each individual one?

View 9 Replies View Related

Programming :: List Only Hidden Files In Current Directory?

Feb 15, 2010

How to list only hidden files in current directory ?

View 2 Replies View Related

General :: Using Cp Properly - Copy A Directory Somewhere Else Into This Current Directory ?

May 13, 2011

I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.

Code:

That is what it shows in the man pages, but when I do that, it says cp: no match

View 5 Replies View Related

Ubuntu :: Finding Folders - Extracting Files - Permission - Directory Does Not Exist

Aug 28, 2010

new to ubuntu and linux, and using Lucid 10.04 LTS ok, i'm trying to get XBMC going, and following a nice step by step instruction on wiki.xbmc.org, but now i'm stuck at this step... In Ubuntu the SVN Repositories are not automatically added. You must add them manually. First, download the SVN Repo Installer from: [URL] Extract it to the ~/.xbmc/plugins/programs directory. If this directory does not exist, run XBMC one time and then exit back to Ubuntu. The directory should now exist.

i ran xbmc once (after the video driver problem was solved, though it messed up my dual monitors, gotta figure that one out yet.) i got the zip file, it's in my downloads. now my newbness really shows... i can't find an 'extract' command for gnome, can't find the .xbmc directory using the file browser, can't figure out how to hunt for folders instead of files, and don't know how to look inside folders i don't have permission to, that is, i don't know if there's a 'sudo' like option for the file browser. i've been searching the forums, but without the correct search terms, i'm wading in an ocean. i really want to give ubuntu an honest try, but i feel like a foreigner. EDIT: btw, up to this point, the forums have been invaluable, you all are great.

View 2 Replies View Related

General :: Push/pop Current Directory?

Jan 11, 2011

With bash is there a way to push and pop the current working directory? I tried writing bash;cd dir; ./dostuff;exit; but the current directory is now dir.

View 2 Replies View Related

General :: How To Untar To Current Directory

Nov 13, 2010

1. is there a way to prohibit a program from writing data on the hdd?
2. can i have different icons on each gnome workspace and how?
3. how to untar to current directory?
"tar -xvvf blablah.tar.gz" does not work
"tar -xvvf blabla.tar.gz -C ./" does not work
in both cases, the files go into some strange random locations.
4. how can i change the way colors are displayed for different content in the xfce terminal? I used to have red for archives, blue for dirs etc. in kde, but lost all that after changing to gnome.

View 7 Replies View Related

General :: Finding A Directory In A Terminal

Jul 2, 2010

How can I find a particular directory in a terminal window in Linux? I think it involves using grep, but I'm not sure how.

View 3 Replies View Related

Red Hat / Fedora :: Finding A Sed Command To Print A List Of Files In "/home" Directory?

May 14, 2009

I need a sed command to print a list of files in "/home" directory, ending in ".sh"

View 4 Replies View Related

General :: Copy Everything In Current Directory To Subdirectory?

Aug 25, 2010

How Can I Copy Everything in Current Directory to Subdirectory in linux console

View 6 Replies View Related

General :: Find Current Thunar Directory From CLI?

Apr 20, 2011

Is it possible to find out the directory Thunar is currently displaying from the command line? I will only have one instance of Thunar open at one time.

View 3 Replies View Related

General :: Set Current Directory As Environment Variable

Jul 10, 2010

How do you set current directory (full path) in an environment variable?

View 10 Replies View Related

General :: Show The Current Local Working Directory In Ssh?

Feb 15, 2011

this is gonna be changed to another thread

View 1 Replies View Related

General :: Tar Command - Making Archive From Current Directory?

Mar 31, 2011

I have been playing around with the tar command and I know this is how to use it.
Code:
tar -cf [filename] [directory]
But what I want to make an archive from the current directory I thought just to not enter a directory but that doesn't work. I get an error about creating a empty archive so how to do I make it so how do I tell it to do the current directory?

View 5 Replies View Related

General :: Find All First Level Subdirectories Under The Current Directory?

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

General :: Web Searches Cannot Locate Way Of Specifying 'each File In Current Directory'

Mar 23, 2011

I have several directories of subtitles for some videos, but all the text for the subtitles in each file is in uppercase, and I would like to convert the files' content to lowercase, all in one go. I found on a website a bash command that would do each file separately:tr '[:upper:]' '[:lower:]' <input.txt> output.txt but of course involves specifying the input name and output name for each file.I have been trying to do it in a script that would work for all files in the current directory, without having to rename them each time, if that's possible. So far I've got the following, which doesn't work:

#!/bin/bash
for file in $@; do
tr '[:upper:]' '[:lower:]'
done

However, my web searches cannot locate a way of specifying "each file in current directory" in conjunction with the "tr" command, but also without having to rename the file once converted to lowercase. Is it possible, or would the tr command have to create a new file for each converted file?

View 3 Replies View Related

General :: Bash - Finding Newest File In A Directory?

Aug 24, 2010

Basically, I am trying to locate and copy the newest .json bookmark backup in my .mozilla/firefox/w987sdg9.default/bookmarkbackups directory.

I tried this

Code:

ls -t ~/.mozilla/firefox/b1ahb1ah.default/bookmarkbackups/ | head -1

which does return the newest file, but only the filename itself. I found readlink, but I haven't gotten that to output a full path which I can then feed to copy. So, it seems to me that find might work well here, and I know how to find based on absolute dates, but not relative.

View 2 Replies View Related

General :: No File Called Config.status In Current Directory

Apr 17, 2011

I'm trying to compile a program from source. When I run make the following appears:./ config. status --recheck make: ./config.status: Command not found make: *** [config.status] Error 127.There is no file called config. status in the current directory. Why was it not created?

View 1 Replies View Related

General :: Setting Current Directory In Init.d Boot Script

Jul 28, 2011

I have a jar file which can be executed by going to the directory and then running 'java -jar start.jar'. Start.jar is the Solr example server.I would like to create a boot script in init.d for this, but have little experience with this.Is there a way to specify the 'current' directory in a boot script?

View 1 Replies View Related

General :: Create A File In The Current Directory Named '5' With The Number '2'?

Aug 24, 2010

Code:
$ echo 2 * 3 > 5 is a valid inequality. This will create a file in the current directory named '5' with the number '2' in it, the names of all the files in the current directory, followed by the number '3' and 'is a valid inequality.'

What I do not understand is why 'is a valid inequality' gets written to this file. I thought it would write '2', all the file names in the current directory, then '3' into the file called '5'. Why does the 'is a valid inequality.' get written to the file also?

View 3 Replies View Related

General :: Finding A Command For Going Back A Number Of Steps In A Directory Without Using Cd?

May 10, 2011

I'm constantly going 'cd ../../../../'. Is there a command/alias that could let me go 'cmd 4' and I'd be taken back 4 directories?

View 8 Replies View Related

General :: Bash History And Keeping Track Of Current Working Directory?

Jun 8, 2010

I would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved