General :: Move 10 Files Of .dat Extention To .txt Using Single Command Or Script?
Nov 22, 2010
I have 10 files of .dat formatsayA MCDR .datB MCDR .datand so one upto 10 dat filehow i convert these 10 dat files to txt files using single command or script
View 6 Replies
ADVERTISEMENT
Nov 2, 2010
I have run a command which finds a lot of files based on some search criteria. It returns the files like so:
./somepath/somepath/file.something
./asdf/asdf/s.php
./etc/a.php
./a/b/c/d/e/f/g.jpg
So I was wondering, if I capture this output into a file (ie. one file per line), can anyone help me write a command which iterates through the file and moves the files one by one to a specified directory?
View 3 Replies
View Related
Mar 18, 2009
I'm trying to find a proper command to move a certain set of files according to date/time range. I am thinking that the command should be something like:
Code:
ls -l | grep 'date/time range' | mv /folder
View 6 Replies
View Related
Mar 18, 2011
I've been searching high and low for a solution to my problem, and have not had much luck as to yet!The situation is: I have two files containing bits of info that both need to be included in a single command, such as a for loop, but as separate elements. What I need to do is basically this:Code:ssh <servers in list a> ls -la | grep <items in list b>Does anyone have any thoughts on how I might do this? Is it possible to do using bash scripting alone?
View 3 Replies
View Related
Mar 12, 2010
I'm doing a little work on my media center and the scrappers seem to do a much better job when each movie is in a directory with the name of the movie. However that's not how i have things set up.I have a few hundred avi files i need moved to directory named the same as the avi file.
View 3 Replies
View Related
Sep 15, 2010
I liked the idea of the "cosmos" screensaver/desktop, but wanted to add my own pictures to the application. I navigated to /usr/share/backgrounds/cosmos and tried to drag and drop. I quickly found that I did not have permission to do this.
I googled my problem and found some command line tutorials telling me to sudo cp. My problem is that I have about 30 pics that I want to move in there, and I don't think I can just move the directory, they have to be in that folder as the pictures themselves.
I don't really feel like typing the cp line multiple times with multiple randomly named image files.
Is there a way to have the command line cp all of my files from one directory to another?
View 4 Replies
View Related
Sep 10, 2010
What is the single command that will remove all 'other'permissions from all files and directories under /home.
Just starting to learn Linux.
View 1 Replies
View Related
Aug 25, 2009
How can you create a script to move or copy files from a main directory into multiple directories below the main directory.
View 7 Replies
View Related
May 7, 2011
1. Every Sunday2. Find all files older than 1 day3. Gzip these file4. Tar up the gzipped files into one tar file.5. Name the tarball with a date stamp indicating what day it was created, so we know that week's files are in the file
View 3 Replies
View Related
Aug 18, 2009
Being relatively new both to Linux and this forum, i am sorry if i make a post that already is, evn though i couldn`t find it.My problem is i can`t move downloaded files over to root filesystem, i have downloaded and unpacked them to files. to change it`s looks and downloaded a skin, i open root, go to usr---> amsn ---> share --> skins, now i am to copy the file of the skin over to the root directory, butI also tried alt+f2, writing sudo conqueror, as an advice i got, but there was noe difference.
View 14 Replies
View Related
Dec 17, 2009
what I got - from a crontab run a script (understand that part), this script needs to count the amount of files in /outgoing/, then take 30 less that number, and move that many files from /readycalls/. I need to keep the asterisk outgoing que full of .call files with out having to many in there at any given time.
View 3 Replies
View Related
Jul 30, 2011
I want2 know that how stop move folder on samba share.
View 1 Replies
View Related
Jan 16, 2010
I'm trying to create a user john with default password 'abcdef'. I used the following command.
useradd john -p abcdef
I can't login with the password. in /etc/shadow file I can see the password in clear text format. how I can create a user along with password.
View 3 Replies
View Related
Apr 20, 2010
I wish to allow a user to use sudo to run a single command (service app status) to determine if my application app is running, in my sudoers file i have: user ALL= /sbin/service app status I understand that there is a parameter called timestamp_timeout that will set the timeout for the 'user', but requires at least 1 entry of the root password.
I wish to allow the user to do "sudo service app status" and not have to enter the root password ever(maybe once is ok), but still make the user enter the root password for all other root activities. Is there a way to prevent the password entry for this command only and no others?
View 3 Replies
View Related
May 6, 2011
I would have thought the arrows at the edges of the new scrollbar move up/down by line and the grey pads of space between the separator would move by pg/up or down. All seems correct with the exception of the arrows to move up/down.I look around through code, manuals and pdfs and such often and used to the use arrow pointers at the top and bottom of the old scrollbar style to move down or up by line all with the mouse....now with the new scroll bar I find myself struggling all the time for this type of simple operation as it seems the arrows in the overlay scrollbar perform a pgDown/pgUp operation not a move down/up line....anyone know how?
PS - If anyone is curious on how to best to test this on your own, a simple test I did was to create a text file of line numbers with the following command:
seq 1 200 > numbers.txt
View 4 Replies
View Related
Jul 5, 2011
i have 30 linux PCs running. i need to check the performance of all pcs( memory,ram and process usage) in single command or in GUI mode.In solaris we have perf script to check performance in GUI mode. i need same type in linux?
View 1 Replies
View Related
Jul 18, 2010
I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.
I tried the commands
Code:
cp water.txt ./*/water.txt
cp water.txt ./*/
However these don't seem to work. The latter gives 'cp: omitting directory' errors.
View 7 Replies
View Related
Aug 12, 2010
I want to watch a number of processes in "D" status repeatedly with following command:Code:# watch -n 1 'top -b -n 1 | awk '{if ($8 == "D") {print; count++} } END {print count}''but it didn't work. I also tried with double quote. Can I use 'watch' command is this case?PS: I know 'while' and 'sleep' can do the same but it is dirty workaround.
View 2 Replies
View Related
Mar 24, 2010
I am trying to write a very simple script that will go to every subdirectory of a single directory and run a command (lets call it make_ndx).I know I can write this the long way with in a text document with something like:
cd /"the directory"/"the 1st subdirectory"
make_ndx
cd ..
cd "the 2nd subdirectory"
cd ..
Alternatively, I also tried: for i in 'find /path/somemorepath -type d -mindepth 1'; do cd $i; make_ndx -f *.gro; done which returns me with the error cd: find: no such file or directory. But if I run the find command by itself to test if I am calling the right directories, it gives me the exactly the output I am looking for. Any ideas? Should I just write the find results to a file and loop through the contents of the file (which seems a little bit like overkill) or am I just making a simple typographical mistake and I am just not seeing it?
View 7 Replies
View Related
Jun 23, 2011
I increase my knowledge in vim in two ways. Little hints about doing this or that and scattered studies using the vim help files. Please do not believe I always rely on the first one.
View 12 Replies
View Related
Jul 20, 2010
I have very expensive data on my laptop and many user using my laptop so i want to lock my single drive that other user not access my files and my single drive. please tell me right answer ASAP
View 3 Replies
View Related
Jul 16, 2011
How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.
View 7 Replies
View Related
Sep 21, 2010
I want to know the command, so that i can move back two days i.e. all the changes i made during the two day is rolled back .
View 5 Replies
View Related
Sep 6, 2010
I have a directory with a bunch of scripts and other random files. I want to move the files with the executable flag set to another folder en masse (or, if it's easier, the ones without the x flag). Is there an easy way?
View 1 Replies
View Related
Jun 24, 2011
In my bash script I need to move files in a folder if it is not in use.
Code:
for entry in `ls /root/shared_storage/input`; do
echo $entry
run=`lsof /root/shared_storage/input/$entry`
ru=${run:0:5}
echo $entry
if [ "$ru" == "" ]; then
........
It worked fine sometimes but sometimes it just get stuck at lsof. Is there any other way that I can use here to check if the $entry is using some other process?
View 10 Replies
View Related
Jan 3, 2011
i have 10 vi files . these files contain some system related information. i need to combine the output of all these files into a single file. the final file should contain contents of all these 10 files and the output should be in a tabular format.
is there any command in vi that i can use to create a table ?
View 9 Replies
View Related
Mar 23, 2010
Recently i am trying to check on the rsync speed for single file(2.4GB iso) directory ( 900MB directory with files inside ) When i run the rsync for single file: the speed i get is average 50MBps However, for a directory: average speed is 10MBps Is there any reason behind this ? i tried to google but unable to get the concept.
View 2 Replies
View Related
Apr 13, 2010
i have started using linux for less than 6 months. now i have come across a problem with pdf files in linux. i want to join different pages from different pdf files into single pdf file.i have come across softwares that do this but they perform this using page numbers from pdf files.but i need to do this based on keywords in different pages .for eg there 3 pdf files
india.pdf
contents:languages
.........
........
places
......
......
achievments
......
[Code]....
now i have to create a pdf file langunage.pdf ,combining the topic languanges from three pdf files america.pdf,india.pdf,china.pdf how can i do it?? whether there is any open source software for doing this?.
View 3 Replies
View Related
Apr 12, 2010
I have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .
archive all files to one single file in every 30 days , and then remove these old files .
View 9 Replies
View Related
Jun 27, 2011
I just want to know if we can search for a particular string in all files of a particular folder in linux. if a folder has 100files only that hundred files needs to be checked for a particular string.
View 5 Replies
View Related