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


ADVERTISEMENT

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 :: 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 :: Windows - Fastest (and Least Number Of Steps) Way To Migrate Hard Drive Formats?

Feb 19, 2011

I have an ext2 formatted disk (linux) and I need to reformat it to NTFS (windows). Problem is, I have to retain the 750 GB of data that's on the disk. What's the quickest (least number of steps) way to accomplish this? I do have a spare 1TB disk now to help with the transfer.

Background.I've been using XBMC Live for a couple of years, but with all the problems I've been having lately, I'm moving over to the Windows version. Unfortunately all of my media is stored on an ext2 formatted disk (not the same disk as the OS disk).I was thinking of loading up an Ubuntu live disk, and installing ntfs-config. Mount my secondary disk (already formatted NTFS), transfer the files, reformat the original drive, load windows and transfer the files back.

View 3 Replies View Related

General :: Set Up New Keybinding For Finding Last Command Executed Using The First Few Characters Of The Command In Csh?

Jul 21, 2010

I want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters.

View 1 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 :: Find Number Of Files In A Directory?

Feb 22, 2010

i need to know how to find number of files in a directory? is there any system calls in fedora 12.And i need to know how to perform a operation if the that count increases by one?

View 14 Replies View Related

General :: Copying Large Number Of Files From One Directory To Another

Feb 10, 2010

I've a directory containing around 2.8 lacs of files. I want to move them to another directory.If I use cp or mv then I get an error 'argument list too long'. If I write a script like

for file in ls *; do
cp {source} to {destination}
done

then because of ls command , its performance degrades.How can I do this?

View 7 Replies View Related

General :: Count The Number Of Lines In All Files In This Directory?

Jul 5, 2011

I want to count the lines of all files in this directory and all its subdirectories, but exclude directories "public", "modules", and "templates".

View 2 Replies View Related

General :: Trying To Display Count Of Number Of Subdirectories In Directory

Feb 7, 2011

I am a noob and I am trying to display a count of the number of subdirectories in a directory. I have been able to use find -type d to list directories and subdirs but I want a numerical value of dirs and subdirs. I know ls -l gives a count but when I try ls -l -d all it shows is "." I also have tried a combination with the -R option but nothing seems to be working for me.Please forgive my ignorance but I am working on a script for class and this is the first step.

View 3 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

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 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 View Related

General :: What Number Of Bytes Should Set The Bs To In The Dd Command

Apr 3, 2011

I have just created a usb boot disk so that I can install Fedora 14.I used the following which was successfully. However, I am left wondering what does the bs parameter actually does. I know it mean bytes and copies these at a time. But how do I know what to set it to?dd if=F14-Live-i686.iso of=/dev/sdb bs=8MIn the above example it is set to 8MB. However could I set this to any value that I want?

View 1 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 :: Use Mkdir Command To Create 'local' Directory In /usr - There Are Error - Cannot Make Directory

Jun 16, 2010

I am a student studying computer science course.

Well, I am facing problem when doing lab questions.

I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).

I am required to use the /usr/local directory.

In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".

Look at my screenshot at [url].

View 9 Replies View Related

General :: Find Directory Older Than X And Mv Directory With Sub Files Command?

Jul 13, 2011

I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively

View 4 Replies View Related

General :: Command To Return Number Of Bits (32 Or 64)?

Nov 7, 2010

What is a Linux command that I can run to programmatically return either 32 or 64 to indicate whether the processor is a 32 bit or 64 bit processor?

View 4 Replies View Related

General :: Command To List Number Of Shells

Feb 15, 2010

How can I know how many shells my system support (Is there any specific command)?

View 9 Replies View Related

Fedora :: Finding A Free X Display Number?

Mar 9, 2010

how to find a free X display number?

I am using Xephyr to create a windowed session for logging in as another user. It needs its own X display, though. Obviously I can just give it :1.0 and hope for the best, that it would be better to identify the first free display and use that.

But I don't know how...

View 2 Replies View Related

Programming :: Finding A Number In Windows Like The Inode

Aug 19, 2010

anyone know that the ntfs's file sytem struct? is there's a API or something other could let me get this number? Or there is actually no such number in windows like the number of inode in linux?

View 1 Replies View Related

General :: Command To Know Processor Number In Which A Process Is Loaded?

Sep 21, 2010

Is there any command in linux to figure out , given a process, which processor the process is running? I am interested in figuring out the CPU busy and CPU idle time of that processor.

View 2 Replies View Related

General :: Command / C Function To See Cpu Number On Which Process Running?

Feb 22, 2011

When I fork multiple processes, is there some command or c function to see the cpu number on which the processes are running?

View 3 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

Hardware :: Tool - Finding The Mainboard Serial Number?

Jan 15, 2011

Which linux tool can find out mainboard serial number?

View 5 Replies View Related

Software :: Finding The Right File With Only A Line And Column Number?

Aug 1, 2011

I tried to come up with a thread title that was specific without being too long or cryptic. Don't think I succeeded. In my PHP error log I keep getting this error over and over again:

Code:

EntityRef: expecting ';' at line 565, column 81

It's very odd to me that it doesn't contain any sort of stack trace or file info. I know which of my virtual hosts and therefore which directory it's coming from, and it's happened now on half a dozen different servers that this site has lived on. So obviously I'm trying to track it down and add the missing ';' to the right file. This directory has dozens of sub-directories and hundreds of files though.

This is the best I've managed to come up with so far:

Code:

find . -type f -iname "*.php" -print -exec awk 'NR==565' {} ;
(I've run it both with and without the -iname filter.)

I get a very large list of files, and some of them display the contents of line 565 after them. I've checked through a number of them there, but haven't found the culprit. Is it possible to limit my "find" command to only files that have at least 565 lines? Is it possible to have it only print matches from line 565 that has at least 81 columns? How would I modify that to print perhaps 5 lines on either side (in case the error reporting is pulling a slightly different line.)

View 3 Replies View Related

General :: Sed - Csv Averages On Command Line - Take The Average Of All Rows With The Same 1st Number(key)

Jul 20, 2010

I have a big file full of records like this

1, 2, 4, 5, 6
1, 3, 5, 6, 3
1, 4, 5, 6, 6
2, 4, 5, 5, 5
2, 3, 4, 5, 2

anyway i need to take the average of all rows with the same 1st number(key). i.e.

1, 3, 4.66, 5.66, 5
2, 3.5, 4.5, 5, 3.5

I know this is something awk/sed would be great for, i just dont have enough experience with them to accomplish it, Also, what about averaging those columns together? so, after I output this to a file, id like to get another like:

1, 4.58
1, 4.125

The number of colums to add might not always be 4 either. EDIT: this might be easier to do in gnuplot, so I mainly just need an answer to the first part.

View 3 Replies View Related

General :: Finding IP Address Using Command Prompt?

Apr 4, 2010

I'm looking for a way to get my IP address using the command prompt in Linux. I know when you type "ifconfig" you can get your local IP address (i.e. 192.168.0.103), but I'm looking for my IP address that I get from my ISP. How can I get this from Linux without having to visit some website?

View 3 Replies View Related

General :: Finding Mac Address With Tcpdump Command?

Dec 10, 2009

when i send any packet to anu destination and want to see he mac address of source and destination i am using the command tcpdump -qec1 but rather then getting the mac address of source and destination each time i am getting mac address of the system which is broadcasting. will anybody tell me how can i get source and destination mac address even if any other packet is also being broadcast to my network.

View 1 Replies View Related

General :: Finding Folder Size Using Command

Oct 26, 2009

I want to know is there a command to find size of a folder.

View 4 Replies View Related







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