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


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 Line - Automating A Task - Copy All Subdirectories And Files From One Directory To Another

Jun 10, 2010

I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.

View 2 Replies View Related

Software :: Vim Command To Cut The Current Line And Append To The Clipboard?

Apr 8, 2011

Is there a vim command or sequence of commands that will append the current line into the clipboard? Given the example below:

4
5
3
1
2

Lets say I wanted to cut 3, 4, 5 (in that order) then paste them below 2 so that the numbers are in order?

View 1 Replies View Related

General :: Bring Cursor To 1st Char In Current Line (Command Mode)

Dec 4, 2010

Just in case someone can reply a silly question, I've quite forgot the vi/vim command to bring the cursor to the 1st char in the current line. I do remember that for bringing it to EOL is '$'.

View 14 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 :: 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

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

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

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

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

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

Ubuntu :: Burn A Directory To A CD (Command Line)

Aug 3, 2010

i need to burn a specific Directory (and all it`s content) into a CD by using the command line what do i need to write ?

View 1 Replies View Related

Ubuntu :: Get To The User Directory From Command Line

Oct 24, 2010

how do you get to the usr directory from command line.

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 :: 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

Ubuntu :: Set Custom Directory Icon From Command Line?

Jan 17, 2010

I am looking for a way to (via bash script) set a custom directory icon for a number of directories. All of these directories contain a "cover.jpg" image. I can accomplish this manually by right clicking the directory > select "Properties > click the directory icon button > select the "cover.jpg" image. I am just looking for the way to do this in the terminal to save time, as the music collection is quite large.

View 8 Replies View Related

Ubuntu :: Command Line To Copy Files From One Location To Another / Retain Source Files Group / User?

Feb 20, 2011

Is there a method at the command line to copy files from one location to another and retain the source files group and user?I'm migrating some MySQL files from one machine to another.I want to back-up the original files in the directory presently. They have owner:group of mysql, some have owner:group root:mysql and so on. To copy them under cli or Nautilus everything changes to root for I execute sudo cp or gksudo nautilus and copy via gui.

Since it is MySQL data I could simply do a dump of the database and restore it on the other machine. But there's about 20 db's and I want to do this via a copy for it will be faster - at least that is what I think.

View 5 Replies View Related

General :: Command Line 'last Directory' Button?

Jun 16, 2010

in the command line there's a button (tab) for autocompleting commands and I'm pretty sure linux has a button that prints the last directory I used/typed whatever?

View 6 Replies View Related

General :: Can See Properties Of A Directory Using Command Line

Mar 4, 2011

I am struggling to learn the command line, and am stuck to the following In my directory ~/Music , I have many music archives , total about 0,8 Gbyte . Yet , changing to this directory ) and giving ls -dlh , I get

ioannis@ioannis-laptop:~/Music$ ls -ldh
drwxr-xr-x 4 ioannis ioannis 4.0K 2011-03-04 14:55

So, only 4 k size and no info about the number of the files in the dir

View 6 Replies View Related

Ubuntu :: Set Of Files In A Directory Using The Line?

Jan 9, 2011

I have a (hopefully) quick question which is regarding some scripting I used to do under a DOS/Windows env. I used to use the "for" command to iterate through a set of files in a directory using the line:

Code:
for each %1 in ([dir]) do [command]

But that doesn't work under bash. I presume the syntax is slightly different but doing

Code:
for --help
or
Code:
man for

Doesn't give me much any information at to syntax or usage. I'm sure there is something in bash or the standard shell, I just can't seem to find it.

View 2 Replies View Related

Fedora :: Create An ISO Image Out Of A Directory From Command Line?

Feb 7, 2010

I am implementing a strategy to organize my data among the several machines I work with and thought that getting some ISO images out of it could be a good idea because that way data would be 'read only' thus allowing for easier synchronization.

At first I thought of using the "dd" command to create the ISO out of a directory, but it fails code...
So, I have two questions:

Is the ISO 'format' capable of storing complex directory structures with long filenames (pretty much as any Linux filesystem does), or are there some inherent limitations?

Supposing the ISO format is not constrained, which command would allow me to create an ISO file out of a directory?

View 5 Replies View Related

Fedora :: Command Line FTP - Transferring Entire Directory?

Jun 10, 2010

Need explanation from a FTP guide's reference of FTP's GLOB command.
mget and mput are not meant to transfer entire directory subtrees of files. That can be done by transferring a tar(1) archive of the subtree (in binary mode). Then FTP does not transfer, even with mput, a directory of files to remote server?
Does this quote suggest I can tar my files, upload them, then untar them on the remote server?

View 1 Replies View Related

General :: Check If A Directory Exists In Command Line?

Jan 21, 2010

How to check if a directory exists in Linux command line?

[Code]....

View 5 Replies View Related

CentOS 5 :: Active Directory Authentication Command Line?

May 21, 2010

I have just installed the 32bit and 64bit versions of CentOS 5.5 and was wondering how I can add these machines to Active Directory for authentication. I've done this in the past with CentOS 5.4 using the GUI and everything worked just fine but now need to do everything from the command line.

View 1 Replies View Related

Ubuntu Servers :: Command Line To Copy File To Root Directory

May 12, 2010

I want to copy file from the Server cd drive and USB drive to the server root directory, but I haven't find any command of listing the cd drive or usb drive.

View 4 Replies View Related

Slackware :: Slackware Current Installpkg Line 59 Rev Command Not Found

Feb 28, 2011

First time I've done this in awhile Upgrading my Slackware64 -current VM, following the standard routine that has always worked in the past -

Code:

slackpkg clean-system
slackpkg install-new
The clean-system removed 2 packages -
util-linux-ng
eggdbus

Installpkg will no longer work, complaining that the rev command is not found. The problem hit with the removal of util-linux-ng. I cp'd util-linux to ~/. Extracted with tar and executed the doinstall. Fixed.

View 4 Replies View Related

General :: Create A *one* Line Command That, Using Tar, Will Collect The Full /usr/local Directory?

Oct 6, 2010

I am currently interning at a place and my job is to essentially learn UNIX. My supervisor gives me problems here and there to help guide me with my learning but for the most part I'm doing this all by self-teaching myself. Needless to say I have run into a few obstacles...for instance-Create a *one* line command that, using tar, will collect the full /usr/local directory (you need to run this as root again) and copy the whole /usr/local structure under /optFor example /usr/local/bin/hello will become /opt/local/bin/hello, etc. I want this as follows:1. /usr/local is collected by tar, but the output of this tar command is its stdout.. what you get from the previous stdout, you compress with gzip and send it to stdout again 3. get this output and decompress with gzip.. get this output and pipe to tar in a way that will extract the tree under /opt.If anyone knows how I could go about doing this, please let me know, or at the very least point me in the right direction. What I've got so far (which could be completely wrong) is:tar cvf - usr/local/ | gzip -c - | gunzip -c - | tar xvf -in theory I feel like this should work (except for extracting the tree under /opt...i'm kinda stuck there)

View 3 Replies View Related

Security :: Using Sed To Remove A Line From All Files In Directory

Jan 23, 2010

A Javascript has crept into all my hmtl, php files in my shared hosting account. I have SSH access.How can I use sed to remove that line from all files in a directory recursively ?sed doesnt change the original file.And I need to specify *.php and *.html

View 4 Replies View Related

General :: Delete A Line With Certain Format From Files In A Directory?

Sep 21, 2010

I need a PHP script to delete a line with certain pattern from all filesin a directory. The Directory contain files with extensions .js,.html and.php. Do any body give a working code snippet to Read all files in a directory with above extension and delete that line from the files.

View 1 Replies View Related







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