General :: Move And Create A Directory At The Same Time?

Nov 19, 2010

I am trying to clean my computer. Basically I try to order some movies to put all of them in directories. I started by hand but I am loosing time I guess. I want to do something like:

mv *.avi /nonexisting_directory/

nonexisting_directory being the name of the file without .avi, changing for each file. How can I write in command lineor in script?

View 10 Replies


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 (

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 :: Create A Directory Named Like His Parent Directory

May 26, 2011

I need to create a directory named just like his parent.


I tried this but because there is "Space Characters" in the name of Parent directory, my script fails.

View 8 Replies View Related

General :: Move The Srv Directory To Another Partition?

Jun 28, 2010

When installing Ubuntu (10.04) I chose the /home to be installed in a separate partition.I would now like to move the /srv directory into the same partition. The problem I found is that Ubuntu did not make a /home directory inside the partition itself. It just places the account directories in the partition and mounts it to /home. So I cannot just easily move the /srv folder into the partition.

How can I:

Move those account directories into a home folder inside the partition Make that new home folder the default /home folder. ditto with the /srv folder, or any I choose in the future.

View 3 Replies View Related

General :: Move Old File To Other Directory?

Feb 2, 2010

I have a directory , there are many files created in it , I want to use the command to move the files which elder than 30 days and gzip it and then move it to /tmp , and then remove those files , I tried use below command but not work.

find ~path -type f -mtime 30 -exec tar -zcvf - {} --remove-files > /tmp/oldfile.tgz ;

View 1 Replies View Related

General :: Move Files To Another Directory Using A Cron Job?

Sep 29, 2009

I have a php script in cron directory that generates 5 textfiles, after the files are generated, I want to create a script that will move the 5 text fiels to anoher folder name "web".

View 2 Replies View Related

General :: Move The Home Directory To Another Partition?

May 25, 2010

I created a partition in my hard disk for my data (documents, multimedia, etc.).How can I:Move the /home/ directory to the new partitionMake the OS (Ubuntu Linux) treat that directory as the default /home/.

View 1 Replies View Related

General :: Move All Files And Folders Into A New Directory?

Jan 25, 2011

Unix - In Linux, how do I move all files and folders into a new directory?

View 4 Replies View Related

General :: Use Wget To Move Content From One Directory To Another?

Sep 21, 2010

I am new to linux and wget...what would be the syntax to use wget to move content from one local directory to an svn repository (svn commit)? For instance if i have a directory c:\dir1, and i want to move it's content onto an SVN this possible using wget? If so, how do I get this done?

View 2 Replies View Related

General :: Create A Softlink To Move Some Library Folder?

Dec 2, 2010

I'm running out of disk space in root, so I decide to move /usr/lib64 directory to other partition by creating moving the whole directory to new location and create a softlink in the old location. What I'm planning to do is:

1. Copy the whole directory to new location

2. Make sure if there's no problem in the copy process

3. Create a softlink in the old location pointing to the new location.

However, when I'm comparing the old location and the new location using du command, there's some discrepancies between those two where the new location contain bigger size than the old one. How is this possible?

Is this the proper way to save disk space by creating a softlink?

View 5 Replies View Related

General :: Don't Move A Directory / File If Src And Dest Are On Different Partitions

Feb 13, 2010

In order to protect myself if I make a mistake in typing a directory/filename path, I am searching for a way to prevent mv from doing anything if the source and destination files exist on separate partitions.I see no options in the man page.I just need to find a way to get the partition the directory/file is on

View 1 Replies View Related

General :: Move 1 File To A Directory Containing 3 Million Files?

Jul 25, 2011

the system currently have a directory with all the invalid files. how bad is it to move a single file to a directory containing 3 million files already?

View 2 Replies View Related

General :: Syntax For CP - Making Virtual Move To Directory

Jun 13, 2011

I just joined LinuxQuestions and find no Forum specific to command-line syntax questions, so I'll post it here. Here is the question. I can use:
cp -vr --parents /a/b/c/this /x/y
to create a directory /x/y/a/b/c/this containing this and everything under this.

But how could I create a directory x/y/b/c/this (ie omitting a)? I could MOVE to /a/ and then use
cp -vr --parents b/c/this /x/y
but I really don't want to do the MOVE (and can think of circumstances where I might not be able to).

I'm really looking for something exactly similar to the
switch that allows one to make a virtual move to the directory DIRECTORY before commencing the tar operation.

View 5 Replies View Related

General :: Cron Job To Create And Move Backup From Ubuntu To Windows?

Jun 15, 2010

This is Kishore and i am new to Ubuntu and SVN and please some one help me in creating a cron job for my svn backup every day at 10:30 pm I already created a cron job which looks like 30 10 * * * svnadmin dump /home/administrator/svnrepository >svn1 when i run command directly i am getting whole backup and it's size is 3.6 gb but when i run through cron job the backup size is only 9 mb. So finally my requests are 1. cron job for taking complete svn backup at 10:30 pm daily and 2. cron job to copy the SVN backup in to my windows system in d drive and this must be run every day at 11:30 pm.

View 1 Replies View Related

General :: Find A Proper Command To Move A Certain Set Of Files According To Date/time Range?

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:

ls -l | grep 'date/time range' | mv /folder

View 6 Replies View Related

General :: Scripting - Move A List From A Text File To Directory ?

Jan 10, 2011

I'm sure I've done this before and am having a brain fart.

I have run into this a couple of time this last month:

I have a list of torrent files (blahblahhexblah.torrent) saved in a text file. I would like to read the text file and populate the client directory.

I can echo the file using:

But I cannot remember how to pipe the output into the directory, nor can I find any resources that describe the process.

Interestingly enough, I've had a couple of opportunities to do similar tasks with passwords and privileges and even across the LAN in the last few days. Solving this problem will help me solve the others for next time.

View 2 Replies View Related

General :: Auto Unrar Files And Move Whitelist To Another Directory

May 10, 2011

I'm looking for a script that can be run regularly with Cron.

Check a folder for Rar files every few minutes, Unrar if present, and delete the left over files once done.

Be able to specify the directory of which folder to watch within the script.

Run an extension white list (.avi, .mkv, .mp4) and blacklist (rar files) of files to be moved.

Specify within the script which folder to move found files to.

I've seen a few online that does some of this or much more than this but I'm looking for something that just does this in a simple and efficient way... (Also for the life of me, I just can't get how to edit this to do what I'm looking for)

View 17 Replies View Related

General :: Find Files With Specific Extension And Move To A Directory?

Apr 18, 2011

I need little help. I want to find all files with extension "*.tar" "*.gz" and "*.zip" and move all those files into "/opt/old" directory. I've tried this command:


find . -type f -name "*.tar" "*.gz" "*.zip" -print0 | xargs -0 -r mv /opt/test

It's not working, something wrong after "mv" i guess.

View 10 Replies View Related

General :: Cannot Move A File Into My Archives Directory In Bash Scrip

Apr 12, 2010

I cannot move a my file into my archives directory in my bash scrip.

View 7 Replies View Related

General :: Create A Shell Script To Move Only Files Which Has Stopped Growing?

Jul 20, 2009

An external service I dont manage pushes mediafiles into a shared directory on my server. I need to move these files into their correct directories automatically. The problem is that if I run my script as a cronjob once every 3 minutes, I notice that the script copies files which are still on their way into my server. So I need to figure out how to have the script check that the files are complete (done downloading) before the script moves the files. This is what I got so far:


# Script by proximity 280709.
# Locate correct directory


View 8 Replies View Related

Slackware :: Move Into New Directory To Get Wine Working In New Directory?

Aug 1, 2010

I came from the Debian world so I did not do much building software from source. I successfully built wine from source, now the wine binary is in the same directory where the Makefile and all of the other source stuff is. I can run wine from that directory fine, but I sort of want to move it somewhere else. I tried moving the wine binary somewhere else, but when I try to run it I get


What all do I have to move into the new directory to get wine working in the new directory? By convention, where should I move wine, I want it available for all users, should I move it to /opt/wine, or /usr/local/wine, or somewhere else?

View 6 Replies View Related

General :: Get The Last Change Time Of Directory Recursively

May 28, 2011

How can I get the last time any of the files in a directory or its subdirectories has changed?

Dir - changed 1/1/1
Sub Dir 1 - changed 2/1/1
Sub Dir 2 - changed 3/1/1
File 1 - changed 10/1/1
File 2 - change 5/1/1

The output for this for Dir should be 10/1/1 (File 1 was the last modified one). Getting the last file name to be modified is a bonus but isn't necessary.

View 3 Replies View Related

General :: How To Create Shared Directory

Jan 28, 2010

iam new to linux. wanted to know-->how to create a shared directory in lunix which should be accessible from windows

View 4 Replies View Related

General :: AMP Directory Not Found / Need To Create?

May 2, 2010

In Elastix, I get to amportal.conf via the /etc/ director. The file tells you:


It appears that AMPADMINLOGO=logo.png is calling out to something that is not there. I can't even find AMP directory. See below. Do I need to create a directory? This is the result of an ls -F at my /etc/ dir:


View 1 Replies View Related

General :: Copy - Take A Snapshot Of A Directory As It Was At A Particular Point In Time?

Mar 4, 2011

I have a directory containing a lot of result log files (directory size ~ 4GB), and a set of processes running that keep on writing to these files. To be able to correctly analyze the results at a later time, I want to copy the whole directory to an archive destination, and I cannot stop the processes.

I want a copy of the directory as it was at a particular point of time. As the size directory is huge (which means it takes about 40 seconds to copy) and some of the files are being written to, a normal cp -r does NOT give me a snapshot at a particular point in time, rather a snapshot of files spread over some 40 seconds. This is not good enough.

Is there a way to get an exclusive lock on the directory and all its components while copying?

View 5 Replies View Related

General :: RPM + Rpm Installation (not Create Directory According To SPEC)?

Apr 17, 2011

I build simple spec file and build rpmI transfer the new rpm to other Linux machine in order to install the new rpmaccording to the spec file the new rpm -> should create the /tmp/MY_RPM_TESTS directory , but this rpm not create the MY_RPM_TESTS and sub directoriesplease advice why , what I need to fix in the spec file? RPM installation:

[root@linux1 rpm -Uvh /root/rpmbuild/RPMS/i386/
Preparing... ########################################### [100%]
This is preinstall script


View 1 Replies View Related

General :: Create An SSH User Which Can Access Only Certain Directory ?

Jun 18, 2011

I have a Virtual Private Server which I can connect to using SSH with my root account, being able to execute any linux command and access all the disk area, obviously.

I would like to create another user account, which would be able to access this server using SSH too, but only to a certain directory, for example /var/www/

For example, imagine this user has a HUGE error.log file (500 MB) located in /var/www/

When accessing this file using FTP, this user needs to download 500 MB to view the last lines of the log, but I'd like him to be able to execute something like this:

Therefore I need him to be able to access the server using SSH, but I don't want to grant him access to all server areas.

View 2 Replies View Related

General :: Create A Symbolic Link In An Other Directory?

Sep 14, 2011

There are two directories A and B and a file F which is located in B. The working directory is B.How can you create a symbolic link in A pointing to F in B without changing the directory?

View 2 Replies View Related

General :: How To Create /.bashrc In My Home Directory

Nov 12, 2010

How to create /.bashrc in my home directory? do i make a folder naming it /.bashrc or i make its as a file?

View 7 Replies View Related

General :: Script To Create Directory With Date?

Dec 6, 2010

i need to create script to make directory with the current date example : the directory name is " 060122010,1100" or near to that format

View 3 Replies View Related

Copyrights 2005-15, All rights reserved